Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: correct format ph_sendmail and ph_sendsmt Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
krommetje
Super User
Super User
Avatar

Joined: December 29 2004
Location: Netherlands
Online Status: Offline
Posts: 695
Posted: February 13 2005 at 13:19 | IP Logged Quote krommetje

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 View krommetje's Profile Search for other posts by krommetje Visit krommetje's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: February 13 2005 at 21:14 | IP Logged Quote TonyNo

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 View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
krommetje
Super User
Super User
Avatar

Joined: December 29 2004
Location: Netherlands
Online Status: Offline
Posts: 695
Posted: February 14 2005 at 12:35 | IP Logged Quote krommetje

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 View krommetje's Profile Search for other posts by krommetje Visit krommetje's Homepage
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: February 14 2005 at 16:18 | IP Logged Quote dhoward

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 View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum