Developer forum

Forum » Development » Smtp error in custom module

Smtp error in custom module


Reply
Here is the code im using to send the mail:

System.Net.Mail.

mail.IsBodyHtml =

System.Net.Mail.

smtp.Send(mail);

MailMessage mail = new System.Net.Mail.MailMessage(this.Properties.get_Value("mySender"), this.Properties.get_Value("myRecipient"), this.Properties.get_Value("mySubject"), mytext);true;SmtpClient smtp = new System.Net.Mail.SmtpClient(Dynamicweb.Modules.Common.Constants.SMTP); and this is the error message i get when the module tries to send. System.Net.Mail.SmtpException: Failure sending mail. ---> System.Net.WebException: The remote name could not be resolved: 'localhost;smtp.dynamicsystems.dk' at System.Net.ServicePoint.GetConnection(PooledStream PooledStream, Object owner, Boolean async, IPAddress& address, Socket& abortSocket, Socket& abortSocket6, Int32 timeout) at System.Net.PooledStream.Activate(Object owningObject, Boolean async, Int32 timeout, GeneralAsyncDelegate asyncCallback) at System.Net.PooledStream.Activate(Object owningObject, GeneralAsyncDelegate asyncCallback) at System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout) at System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port) at System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port) at System.Net.Mail.SmtpClient.GetConnection() at System.Net.Mail.SmtpClient.Send(MailMessage message) --- End of inner exception stack trace --- at System.Net.Mail.SmtpClient.Send(MailMessage message) at CustomModules.CustomModules.CustomDownloadbox.CustomDownloadbox.GetContent() at Dynamicweb.Frontend.Content.getModule(DataRow& ParagraphRow) the site is located at climateconsult.net.dynamicweb.dk

Replies

 

You must be logged in to post in the forum