Author |
|
krommetje Super User
Joined: December 29 2004 Location: Netherlands
Online Status: Offline Posts: 695
|
Posted: February 13 2005 at 13:19 | IP Logged
|
|
|
Hi all,
I can't seem to get the functions ph_sendemail and ph_sendsmtpemail working. What is the correct format for sending an e-mail from a macro... All macros and formulas evaluate to a ! Does someone have an example of a formula or macro which sends an e-mail in which I can see the correct format?
Peter
|
Back to Top |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: February 13 2005 at 21:14 | IP Logged
|
|
|
I use this macro to setup the email info...
insert into macroheader values ('SETUP EMAIL','SETUP EMAIL',0,0,1);
insert into macrodetail values ('SETUP EMAIL',1,15,'[EMAILNAME]',NULL,'"email@mydomain.com"',0);
insert into macrodetail values ('SETUP EMAIL',2,15,'[EMAILSUBJECT]',NULL,'"PowerHome Update"',0);
insert into macrodetail values ('SETUP EMAIL',3,15,'[DIALUPUSER]',NULL,'"name"',0);
insert into macrodetail values ('SETUP EMAIL',4,15,'[DIALUPPASSWORD]',NULL,'"pw"',0);
...and then do a "Send Email" and specify the string to send.
I haven't needed to use the functions yet.
HTH
|
Back to Top |
|
|
krommetje Super User
Joined: December 29 2004 Location: Netherlands
Online Status: Offline Posts: 695
|
Posted: February 14 2005 at 12:35 | IP Logged
|
|
|
Hi TonyNo,
your macro works fine! Thanx for the reply. At first I wanted to use the ph_sendemail formula, but no matter what I tried.... everything evaluated to a ! Now I call your macro inside my macro e.g. when my smokealarms have detected smoke..., Also when the temperature sensors detect a temperature of 95 celcius or higher in my solar-boiler or the temperature of the Central Heating water is above 60 celcius which indicates a defect I get an e-mail. The text inside the mail I save as a global Var.
Edited by krommetje
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: February 14 2005 at 16:18 | IP Logged
|
|
|
A properly formatted ph_sendsmtpemail function can be seen below:
ph_sendsmtpemail("mail.myx10.com",25,"dhoward@myx10.com","so meuser@yahoo.com","Test Email Subject","Test Email Body.")
The "Send Email" macro command will use your default MAPI email client (usually Outlook Express). The ph_sendsmtpemail function communicates directly with an SMTP server. The advantage of the ph_sendsmtpemail function is that if there is a problem, PowerHome won't hang. If your MAPI client encounters a problem (asking for password, etc). and hangs, then PowerHome will also hang.
Dave.
|
Back to Top |
|
|
|
|