Hi Imar
I tried sending mail with the CreateUserWizard. My SMTP server needs authentication, which I declared in the web.config.
Here is the code (I removed the password):
<smtp deliveryMethod="Network">
<network host="mail.avidan.co.il" password="XXXXX" userName="
[email protected]" port="2525" defaultCredentials="true" />
</smtp>
It didn't work, I got an yellow error page (server needs authentication etc etc).
I added then the following code in the CreateUserWizard1_SendingMail prcoedure:
Dim mysmtpclient As SmtpClient = New SmtpClient("mail.avidan.co.il")
mysmtpclient.Port = "2525"
mysmtpclient.Credentials = New System.Net.NetworkCredential("
[email protected]" , "xxxxx")
mysmtpclient.Send(e.Message)
e.Cancel = True
Now it's working! Why did I have to add the code in the CreateUserWizard1_SendingMail procedure? I thought putting the code in the web.config is enough.
Thanks
Alex