SMTP Help !!!
-
Hi all, There is a problem i am facing and stuck in it.I am trying to send email from my aspx page using my company smtp mail server.i am using the following code. ''''''''''''-------------------------------------'''''''''''''' Dim oMsg As New MailMessage() Try oMsg.From = txtFrom.Text oMsg.To = txtTo.Text oMsg.Subject = txtSubject.Text oMsg.Body = txtBody.Text SmtpMail.SmtpServer = "CompanySMTPServer" SmtpMail.Send(oMsg) lblmsg.Text = "Message Send Successfully." Catch ex As Exception lblmsg.Text = ex.Message End Try ''''''''''''-------------------------------------'''''''''''''' i am getting this error. Could not access 'CDO.Message' object. I have gone through several of my hits on google about this and tried some hints. there are few things. 1- If i give "localhost" in place of smtp server then mail is successfully sent this means code is fine but it resides in Mailroor\queue as i have no access to DNS server. 2-I am using this smtp server "CompanySMTPServer" in my outlook so this means its workin fine. Could anyone take forward my discussion. i will be grateful. Thanks payback
-
Hi all, There is a problem i am facing and stuck in it.I am trying to send email from my aspx page using my company smtp mail server.i am using the following code. ''''''''''''-------------------------------------'''''''''''''' Dim oMsg As New MailMessage() Try oMsg.From = txtFrom.Text oMsg.To = txtTo.Text oMsg.Subject = txtSubject.Text oMsg.Body = txtBody.Text SmtpMail.SmtpServer = "CompanySMTPServer" SmtpMail.Send(oMsg) lblmsg.Text = "Message Send Successfully." Catch ex As Exception lblmsg.Text = ex.Message End Try ''''''''''''-------------------------------------'''''''''''''' i am getting this error. Could not access 'CDO.Message' object. I have gone through several of my hits on google about this and tried some hints. there are few things. 1- If i give "localhost" in place of smtp server then mail is successfully sent this means code is fine but it resides in Mailroor\queue as i have no access to DNS server. 2-I am using this smtp server "CompanySMTPServer" in my outlook so this means its workin fine. Could anyone take forward my discussion. i will be grateful. Thanks payback
Hi, Have you had a look at this site? Dedicated to System.Web.Mail? :) HTH, Thea
-
Hi, Have you had a look at this site? Dedicated to System.Web.Mail? :) HTH, Thea
Hi Thea. That looks like a great resource... I wish I knew about it about a year ago when I struggled through these same issues!