borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2009 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Getting value form one form to another)Next Topic (UpLoading a image file to a webserver) New Topic New Poll Post Reply
AndreaVB Forum : ASP.Net : Send Email Problem
Poster Message
fabulous
Level: VB Guru


Registered: 03-08-2002
Posts: 439

icon 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
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
zimcoder
Level: VB Lord


Registered: 27-10-2003
Posts: 225
icon 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
View Profile Send Email to User Show All Posts | Quote Reply
fabulous
Level: VB Guru


Registered: 03-08-2002
Posts: 439
icon 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
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
fabulous
Level: VB Guru


Registered: 03-08-2002
Posts: 439
icon 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)


Brain Bench Certified VB.NET Developer

10-02-2004 at 10:34 PM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
AndreaVB Forum : ASP.Net : Send Email Problem
Previous Topic (Getting value form one form to another)Next Topic (UpLoading a image file to a webserver) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2009 Andrea Tincaniborder