$to = "recipient@example.com";ASP
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
if (mail($to, $subject, $body)) {
echo("Message successfully sent!");}
else {
echo("Message delivery failed...");}
Set objMessage = CreateObject("CDO.Message") objMessage.Subject = "test"* mail server should be running and functioning
objMessage.From = "emailaddr@domains.ext"
objMessage.To = request.Form("emailadd")
objMessage.TextBody = "Blah"
objMessage.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objMessage.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost"
objMessage.Configuration.Fields.Item
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objMessage.Configuration.Fields.Update
objMessage.Send
* mail server's mail service configuration should be considered
No comments:
Post a Comment