What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Send mail when contact logs in

Send mail when contact logs in
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Send mail when contact logs in
This would work but would require you to have a GMail account.

Javascript code:
function OnEvent_ContactSignin(strEmail) {
    if (strEmail === 'mygirlfriend@hotmail.com')
        SendMail(strEmail, 'Online');
}
 
function SendMail(strEmail, strStatus) {
    var strFromEmail        = 'joesmith@gmail.com';
    var strPassword         = 'Testing01!';
    var oEmail              = new ActiveXObject('CDO.Message');
    oEmail.From             = strFromEmail;
    oEmail.To               = 'johnsmith@hotmail.com';
    oEmail.Subject          = 'Contact status is now: '+strStatus;
    oEmail.TextBody         = strEmail+' status is now: '+strStatus;
   
    var oEmailConfig        = oEmail.Configuration;
    with (oEmailConfig) {
        Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver")         = 'smtp.gmail.com';
        Fields("http://schemas.microsoft.com/cdo/configuration/smtpserverport")     = 465;
        Fields("http://schemas.microsoft.com/cdo/configuration/sendusing")          = 2;
        Fields("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate")   = 1;
        Fields("http://schemas.microsoft.com/cdo/configuration/smtpusessl")         = true;
        Fields("http://schemas.microsoft.com/cdo/configuration/sendusername")       = strFromEmail;
        Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword")       = strPassword;
       
        Fields.Update;
    }
    oEmail.Send;
}

12-09-2011 08:04 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Send mail when contact logs in - by tosjowner on 09-11-2011 at 12:02 PM
RE: Send mail when contact logs in - by matty on 12-09-2011 at 08:04 PM
RE: Send mail when contact logs in - by CookieRevised on 12-09-2011 at 11:53 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