What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » To send email

To send email
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: To send email
You are not configuring the SMTP settings for the email. The object has no idea where to send the email through if you do not specify it...

Javascript code:
SendEmail('Script <script@msghelp.net>', 'myemail@mydomain.com', 'this is a test email', '<html><head><title>Test Title</title></head><body>Test message body</body></html>', 'smtp.mydomain.com', 25, 10);
 
function SendEmail(from, to, subject, body, server, port, timeout){
    var iMsg = new ActiveXObject('CDO.Message');
    var iConf = new ActiveXObject('CDO.Configuration');
    var Flds = iConf.Fields;
    var Base = 'http://schemas.microsoft.com/cdo/configuration/';
    Flds.Item(Base + 'sendusing') = 0x2 /* cdoSendUsingPort */;
    Flds.Item(Base + 'smtpserver') = server;
    Flds.Item(Base + 'smtpserverport') = port;
    Flds.Item(Base + 'smtpconnectiontimeout') = timeout;
    Flds.Update();
    iMsg.Configuration = iConf;
    iMsg.To = to;
    iMsg.From = from;
    iMsg.Subject = subject;
    iMsg.HTMLBody = body;
    iMsg.Send();
}

05-23-2009 05:05 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
To send email - by toto69230 on 05-23-2009 at 11:30 AM
RE: To send email - by Jesus on 05-23-2009 at 11:34 AM
RE: To send email - by NanaFreak on 05-23-2009 at 12:00 PM
RE: To send email - by matty on 05-23-2009 at 05:05 PM
RE: RE: To send email - by toto69230 on 05-23-2009 at 05:47 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On