ASP SMTPsvg Email

The function that follows will allow you to quickly replace MPS.SendMail in all of your ASP scripts.
To use the function, first place it at the begining of any scripts that currently use MPS.Sendmail. Once you've done that, remove any lines reading 'Set something = Sever.CreateObject ("MPS.SendMail")', then replace all occurances 'something.SendMail' with 'sendMessage'.


For example, this:

something = Server.CreateObject("MPS.SendMail")
errorCode = something.SendMail ("From", "To", "Subject", "Body")
would become this:
errorCode = sendMessage ("From", "To", "Subject", "Body")

Sample Code:

<%
Function sendMessage (mailFrom, mailTo, mailSubject, mailBody)
' sendMessage takes the same parameters as MPS.SendMail
' response = sendMessage (From, To, Subject, Body)
Set mailer = Server.CreateObject ("SMTPsvg.Mailer")

mailer.FromAddress = mailFrom
mailer.AddRecipient "", mailTo
mailer.Subject = mailSubject
mailer.BodyText = mailBody

mailer.RemoteHost = "mail.rapidsite.net"

If mailer.Sendmail then ' Send message
     sendMessage = True ' Email was sent ok, return True
else ' Send Failure
     sendMessage = mailer.Response ' Return error message
end if

end function
%>

Logo of Edelweiss   Mahindra Logo   Logo of IDBI   Himalayan Logo   ICICI Foundation Logo   Camlin Kokuyo Logo   Logo of Okaya   Microtek Logo   Logo of Action Tesa   Wonderchef company Logo   Vichare Express & Logistics Pvt Ltd Logo   Logo of Bonanza Bullion Private Limited   Globetech Logo   Mascot Universal Logo   Logo of Connell Bros   GDA Trusteeship Ltd Logo   Asian Logo   ROGER Car Techssories Logo   Elite International Logo   Charminar Logo   Logo of Brave   Goldmedal Logo   Logo of Slider Bearings   National College Logo   Mafatlal Logo   Krishgen Logo    
E-mail : sales@virtualsplat.com
Phone : +91-9892413501

Whatsapp Icon +91-9967648641

Whatsapp Icon +91-9967648641

Whatsapp Icon Whatsapp Icon Facebook Google+ Linkedin Twitter