Click here to Skip to main content
15,913,854 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi
We are not able to send email using our classic ASP code.

We are attaching the code snipet, the SMTP address we are using is office365, so authentication is mandatory.

Could you please help us on how to pass credentials using classic asp?

Code snipet-

<%

Set Mail = Server.CreateObject("Persits.MailSender")
Mail.Host = "smtp.office365.com"




Mail.From = "ankit.4.kumar@domain.com"

Mail.AddAddress "ankit.4.kumar@domain.com"

Mail.Subject = Request("Subject")
Mail.Body = Request("Body")
Mail.IsHTML = True

strErr = ""
bSuccess = False
On Error Resume Next
Mail.Send
If Err <> 0 Then ' error occurred
strErr = Err.Description
else
bSuccess = True
End If

%>
Posted

1 solution

This link shows you how to authenticate your SMTP connection:http://clients.alpshost.com/knowledgebase.php?action=displayarticle&id=102[^]

I'm not sure that this will work for you, however. I don't believe the object you are using supports SSL connections which is required by Office 365.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900