Hi,
I need to send email in ASP .net(vb .net) using smtp. i have found that i can use smtpmail.send() to send email.....but the problem is the page doent show any error and the mail is not received in my inbox too.....i have changed some settings in IIS(default virtual server properties). In the access tab->and on connection i have added 127.0.0.1 ip address....but i have a doubt......do i need to add this 127.0.0.1 ip or my mail server ip???? And in the general tab also i have added my system IP in the IP textbox. the following is the code i have added in my sned button click event.
SmtpMail.SmtpSe rver = ConfigurationSe ttings.AppSetti ngs("SmtpServer ")
SmtpMail.SmtpSe rver.Insert(0, "127.0.0.1" )
SmtpMail.Send(" suguna.r@tcs.co m", "suguna.r@tcs.c om", "test", "test")
Response.Write( "sent")
If the above code is used, then the page doesnt shows any error....and the mail is also not sent.
SmtpMail.SmtpSe rver = ConfigurationSe ttings.AppSetti ngs("SmtpServer ")
SmtpMail.SmtpSe rver = "172.20.33. 126"
SmtpMail.Send(" suguna.r@tcs.co m", "suguna.r@tcs.c om", "test", "test")
Response.Write( "sent")
when the above code is used, 'transport failed to connect to server' error is shown.
Can anyone tell me whats the problem....wher e i have made the mistake???and what is the difference in both these codes?please help me....
I need to send email in ASP .net(vb .net) using smtp. i have found that i can use smtpmail.send() to send email.....but the problem is the page doent show any error and the mail is not received in my inbox too.....i have changed some settings in IIS(default virtual server properties). In the access tab->and on connection i have added 127.0.0.1 ip address....but i have a doubt......do i need to add this 127.0.0.1 ip or my mail server ip???? And in the general tab also i have added my system IP in the IP textbox. the following is the code i have added in my sned button click event.
SmtpMail.SmtpSe rver = ConfigurationSe ttings.AppSetti ngs("SmtpServer ")
SmtpMail.SmtpSe rver.Insert(0, "127.0.0.1" )
SmtpMail.Send(" suguna.r@tcs.co m", "suguna.r@tcs.c om", "test", "test")
Response.Write( "sent")
If the above code is used, then the page doesnt shows any error....and the mail is also not sent.
SmtpMail.SmtpSe rver = ConfigurationSe ttings.AppSetti ngs("SmtpServer ")
SmtpMail.SmtpSe rver = "172.20.33. 126"
SmtpMail.Send(" suguna.r@tcs.co m", "suguna.r@tcs.c om", "test", "test")
Response.Write( "sent")
when the above code is used, 'transport failed to connect to server' error is shown.
Can anyone tell me whats the problem....wher e i have made the mistake???and what is the difference in both these codes?please help me....
Comment