ASP .NET CDOSYS

Issue

Not sure with settings of FormMail using ASP.NET

Symptoms

None

Cause

Lack of knowledge with the ASP.NET

Workaround

STEP 1: Open notepad and paste the following code to an ASPX file after performing the necessary changes highlighted in red.

Subject – Subject of the Email
FromEmail – Sender Email Address, only from your domain email
ToEmail – Recipient Emaill Address
MessageBody – Email Message Contents
SMTPHostname – Either is localhost or mail.YOURDOMAINNAME
EmailID – One of your Email Login ID
EmailPassword – Password for the selected Email

<%@ Page Language=”VB” %>
<%@ Import NameSpace=”System.Web.Mail” %>

<%
Dim Mail As New MailMessage
Dim Msmtp As SmtpMail
Mail.Priority = MailPriority.Normal
Mail.To = “ToEmail
Mail.From = “FromEmail
Mail.Subject = “Subject
Mail.BodyFormat = MailFormat.Html
Mail.Body = “MessageBody
Mail.Fields(“http://schemas.microsoft.com/cdo/configuration/smtpserver”) = “SMTPHostname
Mail.Fields(“http://schemas.microsoft.com/cdo/configuration/smtpserverport”) = 27
Mail.Fields(“http://schemas.microsoft.com/cdo/configuration/sendusing”) = 2
Mail.Fields(“http://schemas.microsoft.com/cdo/configuration/smtpauthenticate”) = 1
Mail.Fields(“http://schemas.microsoft.com/cdo/configuration/sendusername”) = “EmailID
Mail.Fields(“http://schemas.microsoft.com/cdo/configuration/sendpassword”) = “EmailPassword
Msmtp.Send(Mail)

Response.Write(“Sent”)

%>

Additional Information

If you are unable to resolve the problem above, kindly issue a ticket to Support Team. 

Updated on March 14, 2019

Was this article helpful?

Related Articles

Leave a Comment

Need Help?
Submit a ticket to us and let our professional team assists you

Support Billing Sales
Support
Billing
Sales