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:
toto69230
Junior Member
**


Posts: 22
29 / Male / Flag
Joined: Feb 2009
O.P. To send email
Hello!
I would like that my script sends email to me, I have to seek on Internet and I found its:

code:
var msg = new ActiveXObject("CDO.Message");
msg.From = "Moi <me@mycomputer.invalid>";
msg.To = "Dave <devnull@ens.fr>";
msg.Subject = "Essai avec CDO.Message";
msg.TextBody = "J'essaie mon nouveau script.\n";
msg.Send();

The problem it is that msg. Send ()
is my operating system Windows Vista, it is the cause of the problem not?

This post was edited on 05-23-2009 at 11:33 AM by toto69230.
[Image: Sniper+Spirit.png]
05-23-2009 11:30 AM
Profile E-Mail PM Find Quote Report
Jesus
Scripting Contest Winner
****

Avatar
Koffie, my cat ;)

Posts: 623
Reputation: 15
37 / Male / Flag
Joined: Jul 2005
RE: To send email
I'm not sure about this, but shouldn't msg.From and msg.To be email addresses only?
Man is least himself when he is in his own person. Give him a mask and he will tell you the truth. (Oscar Wilde)
05-23-2009 11:34 AM
Profile PM Find Quote Report
NanaFreak
Scripting Contest Winner
*****


Posts: 1476
Reputation: 53
32 / Male / Flag
Joined: Jul 2006
RE: To send email
quote:
Originally posted by Jesus
I'm not sure about this, but shouldn't msg.From and msg.To be email addresses only?
no it is quite fine to have it like that, PHP can have i tlike this as well...

if nobody come up with any help with this (something like what matty or cookie would normally post), i will have a look at this tomorrow what i am not capped...
05-23-2009 12:00 PM
Profile PM Find Quote Report
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
toto69230
Junior Member
**


Posts: 22
29 / Male / Flag
Joined: Feb 2009
O.P. RE: RE: To send email
Thanks you very much !
[Image: Sniper+Spirit.png]
05-23-2009 05:47 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »


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