|
Script: Send Email using MAPI
Posted by
Daren
on
Sunday, January 18, 2004 (PST)
Script: Send email using MAPI. MAPI Profile must be configured on the machine in order to properly execute.
|
|
/** * Name: simpleEmail.js * Purpose: Demonstrate using MAPI to send Email using WSH * Author: Daren Thiel * Date: 17 November 1998 * * Note: Rename this file simpleEmail.js * Web: http://www.winscripter.com **/ omapi = new ActiveXObject("MAPI.Session"); omapi.Logon("daren"); objmsg = omapi.Outbox.Messages.Add(); objmsg.Subject = "Sample Message"; objmsg.Text = "This is text message"; objRecip = objmsg.Recipients.Add(); objRecip.Name = "psdrt@yahoo.com"; objRecip.Type = 1; objRecip.Resolve(); var err = objmsg.Send(); WScript.Echo( "Message Sent" );
|
|