Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending a mail whithout users interaction

Status
Not open for further replies.

thecyril

Programmer
Dec 4, 2003
1
MC
Hi, I actualy use this code in foxpro...but there are some users interaction....could someone help me??


SESSION=CREATEOBJECT('mapi.session')
SESSION.LOGON("outlook","cyril")
NEW=SESSION.OUTBOX.MESSAGES.ADD && Create a new message.
NEW.SUBJECT = "Test Mail with OLE Messaging" && Add a message subject.
NEW.TEXT="xxxxxxxxxxxx"
SENDTO=NEW.RECIPIENTS.ADD && Add a recipient object
SENDTO.NAME="mailadress"&& Email address to mail messageto
SENDTO.TYPE=1 && 1= "TO:"; 2="CC:"; 3="BCC:"
SENDTO.RESOLVE() && Looks up address in addressbook.
NEW.UPDATE && Required to save changes to a message object.
NEW.SEND(1,0,0)
SESSION.LOGOFF && Release the MAPI object.


Thanks.
Cyril
 
I have the same issue and I am somewhat solved with the Help of Mike. Please see the thread thread184-720369 - Mapi Session and Mapi message

Kurjo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top