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:
tosjowner
New Member
*


Posts: 1
Joined: Sep 2011
O.P. Send mail when contact logs in
Hello everyone,
I'm kinda new to this forum, but i really would like to program some scripts.

I was wondering if someone has a scipt that sends an email  when a contact logs in.
If you could send me a script that does something like that, i should really appreciate it!

Tosjowner

-edit-
It doesn't actually have to be an e-mail, but i just want to get a notification on my iPod, so when a specific contact comes online, i'll get a notification on my iPod.
i don't care in what way, the easiest will do. (I.e.; twitter, skype, mail, or whatever!)

This post was edited on 09-11-2011 at 12:56 PM by tosjowner.
09-11-2011 12:02 PM
Profile E-Mail PM Find Quote Report
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
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Send mail when contact logs in
Note:
Using the method outlined by matty (CDOSYS), you can use whatever SMTP server you want, not just GMail...
of course you need to have a login and pwd on that smtp server though, and set the appropiate port variable....


PS: in case you have a (windows) hosting somewhere, chances are they also have an SMTP server; in most cases you can use that one too.

This post was edited on 12-09-2011 at 11:55 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
12-09-2011 11:53 PM
Profile 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