|
Search:
Advanced search
|
Browse by category:
|
Glossary |
ASPmail code example tutorial |
||||
// get a mail object
oMail = Server.CreateObject ( "SMTPsvg.Mailer" ); // setup the mail if ( sFromEmail == "" ) oMail.ReplyTo = 'Anonymous'; else oMail.ReplyTo = sFromEmail; // ========================= // important - ASPMail only works if the // FromAddress is the same domain as // the RemoteHost domain // ========================= oMail.FromAddress = 'james@' + sHostDomain; oMail.RemoteHost = 'mail.' + sHostDomain; var sEmailList = sToEmail.split ( /[\s;,]/ ); var nEmail; for ( nEmail in sEmailList ) oMail.AddRecipient ( "", sEmailList [ nEmail ] ); sEmailList = sBccEmail.split ( /[\s;,]/ ); for ( nEmail in sEmailList ) oMail.AddBCC ( "", sEmailList [ nEmail ] ); oMail.Subject = sSubject; oMail.BodyText = sBody; // send it oMail.SendMail ( ); |
||||
Powered by
KnowledgebasePublisher (Knowledgebase software)

