fabulous Level: VB Guru Registered: 03-08-2002 Posts: 439
Send Email Problem
Hi Guys.
I am working on a web form that takes info from the visitor and sends email to the relevant people when the visitor submits the page. Now when I send the email I am getting an exception which is telling me something about my SendUsing configuration setting not being set properly.
Does anyone know why this is so, and most importantly, how i can get aroung this. Thank you in advance.
____________________________
My boss is a Jewish Carpenter (Jesus Christ)
Brain Bench Certified VB.NET Developer
05-01-2004 at 05:11 PM
|
zimcoder Level: VB Lord Registered: 27-10-2003 Posts: 225
Re: Send Email Problem
The SendUsing error would most probably have occured due to your not having specified the SMTP server to use.. So ASP.NET is asking this question..SendUsing?. You then need to make sure you have an SMTP server and then set your Smtp.Server property to the appropriate server. ie
c# :
SmtpMail.SmtpServer = "Your Smtp Server"
[Edited by zimcoder on 08-01-2004 at 09:54 AM GMT]
____________________________
BrainBench ADO.NET and ASP.NET Certified Developer
06-01-2004 at 09:21 AM
|
fabulous Level: VB Guru Registered: 03-08-2002 Posts: 439
Re: Send Email Problem
Thanx ZimCoder
I tried specifying the Smtp.SmtpServer and got a new exception.
"The server rejected the sender account ...."
I went and allowed anonymous access to the SmtpServer and the exception I started getting is:
"The server rejected the recepient address - ***@***.***"
The documentation of that error says that the error is raised if I use a query for the email which I am not doing. It also says if the to address is as such -mailto:<address>, which I am not doing.
I played around with a few more settings and now I don't get an exception, but there is another problem. This time it says the email has been sent but I do not receive the email since I am sending it to myself for the test version.
I am using the Smtp Virtual Server that comes with Windows XP if that is any help in assisting me. Thanx in advance for you help.
____________________________
My boss is a Jewish Carpenter (Jesus Christ)
Brain Bench Certified VB.NET Developer
10-01-2004 at 11:31 AM
|
fabulous Level: VB Guru Registered: 03-08-2002 Posts: 439
Re: Send Email Problem
Update: I played around with a lot of settings without knowing what I was doing. Basically the same thing as before, allowing anonymous access, creating a list of trusted addresses and stuff but still it wouldn't work. Gave up on it for a while and then returned one day and tried a few changes to the SmtpVirtual server and now it does send. It is still rejecting my address but it sends to other people. I'm done trying to understand what is wrong with my email address, just grateful that it works.
____________________________
My boss is a Jewish Carpenter (Jesus Christ)