email sending problem
-
Dear all, Am sending this msg regarding asp.net 1.1 email usage. My code for sending email is below. The problem it is reaching my inetpub/mailroot/queue instead of actual mail id. I have seen all my smtp server settings which are using port 25 and localhost as smtpserver.No error nothing. Can anybody resolve using asp.net 1.1 not with 2.0. I had the solution for 2.0 Code is on button click event Dim cdoconfig, cdomessage, sch sch = "http://schemas.microsoft.com/cdo/configuration/" cdoconfig = Server.CreateObject("CDO.Configuration") cdoconfig.Fields.Item(sch & "sendusing") = 2 cdoconfig.Fields.Item(sch & "smtpserver") = "localhost" cdoconfig.Fields.Update() cdomessage = CreateObject("CDO.Message") With cdoMessage .Configuration = cdoconfig .From = _txtFrom.Text .To = _txtTo.Text .Subject = _txtSubject.Text .TextBody = _txtMessage.Text .Send() End With cdomessage = Nothing cdoconfig = Nothing I tried maximum trails still am not with the right solution.Can nay body tell me if u r free.
kissy
-
Dear all, Am sending this msg regarding asp.net 1.1 email usage. My code for sending email is below. The problem it is reaching my inetpub/mailroot/queue instead of actual mail id. I have seen all my smtp server settings which are using port 25 and localhost as smtpserver.No error nothing. Can anybody resolve using asp.net 1.1 not with 2.0. I had the solution for 2.0 Code is on button click event Dim cdoconfig, cdomessage, sch sch = "http://schemas.microsoft.com/cdo/configuration/" cdoconfig = Server.CreateObject("CDO.Configuration") cdoconfig.Fields.Item(sch & "sendusing") = 2 cdoconfig.Fields.Item(sch & "smtpserver") = "localhost" cdoconfig.Fields.Update() cdomessage = CreateObject("CDO.Message") With cdoMessage .Configuration = cdoconfig .From = _txtFrom.Text .To = _txtTo.Text .Subject = _txtSubject.Text .TextBody = _txtMessage.Text .Send() End With cdomessage = Nothing cdoconfig = Nothing I tried maximum trails still am not with the right solution.Can nay body tell me if u r free.
kissy
There could be many reason in behind.
Kissy16 wrote:
which are using port 25
Please check Port is not blocked by firewall. You can try one thing : 1. Go To > IIS > Default SMTP Server > Properties 2. Go to Delivery Tab 3. Set First, Second, Third, Subsequent Retry Interval To
1
Hope this will resolve your Issue :)cheers, Abhijit CodeProject MVP Web Site:abhijitjana.net My Latest Article : IIS Remote Debugging
-
Dear all, Am sending this msg regarding asp.net 1.1 email usage. My code for sending email is below. The problem it is reaching my inetpub/mailroot/queue instead of actual mail id. I have seen all my smtp server settings which are using port 25 and localhost as smtpserver.No error nothing. Can anybody resolve using asp.net 1.1 not with 2.0. I had the solution for 2.0 Code is on button click event Dim cdoconfig, cdomessage, sch sch = "http://schemas.microsoft.com/cdo/configuration/" cdoconfig = Server.CreateObject("CDO.Configuration") cdoconfig.Fields.Item(sch & "sendusing") = 2 cdoconfig.Fields.Item(sch & "smtpserver") = "localhost" cdoconfig.Fields.Update() cdomessage = CreateObject("CDO.Message") With cdoMessage .Configuration = cdoconfig .From = _txtFrom.Text .To = _txtTo.Text .Subject = _txtSubject.Text .TextBody = _txtMessage.Text .Send() End With cdomessage = Nothing cdoconfig = Nothing I tried maximum trails still am not with the right solution.Can nay body tell me if u r free.
kissy
Kissy16 wrote:
cdoconfig = Server.CreateObject("CDO.Configuration")
I am not sure why are you using CDO to do this in .Net. In .Net 1.1, you should rather use the System.Web.Mail.MailMessage do send email.
Manas Bhardwaj Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.