Hi I'm new to the Classifieds Starter Kit. I just installed it today. Everything seems to be working fine except email. My settings for email in web.config are:
The exception I get from any function that sends email is "The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue a STARTTLS command first"
My ISP told me that its smtp server uses encryption with SSL (and still port 25). Could that be the problem? If so how can I get this to work with SSL ?
Can you look if there is the flag SSL=true? If not you'll have to change the source code to add that into the fuction before you recompile. I remember working in that source code a year ago, there is only one place you need to change it. Its 1.1 or 2.0?
If I set in code the flag EnableSsl to true and if I set in web.config the flag defaultCredentials to false then the email works fine. Thank you for your help !
Thanks albertpascual for your quick answer. It's 2.0. Is the SSL flag you are talking about looks like the following:?
System.Net.Mail.SmtpClient mailClient = new System.Net.Mail.SmtpClient();
mailClient.EnableSsl = true;
Thanks
Hi,
I see that I have the same problem as you only you already has sovled it. Could you tell me where exactly in code you heve set
EnableSsl = true? On your Default page in code behind file? Or somewhere else? Many thanx in advance
Hi I am trying toget my mail working on my classified site and I came across your post...
I am having a similar problem... everything works fine except my email .. when you click on the "Respond to Ad" link I get an error that says "email not sent"
I have had a couple of suggestions on how to fix it but when I ask further questions they go unanswered. This is my first asp site so I am very new to asp..
I was wondering if you could possibly answer a question for me....
I was told I could fix my email with the following code....
but where does the code from the word Then go? I don't think it goes in the web.config file.... and Is the first ewmail address the address that I want them to respond to? Where do I get the second email addresss?
The problem for me it's because I'm using the .NET login controls and I need to send mails only changing the SSL attribute in the web.config but I don't the name of the attribute and how to use it.
Why do you specify in the config file the username and the password since you are using defaultCredentials? These two elements are used only if you specify defaultCredentials="false" (which is the default value)
Annddrew
Member
237 Points
85 Posts
Email not working with an SMTP server that has SSL?
Oct 21, 2006 11:35 PM|LINK
Hi I'm new to the Classifieds Starter Kit. I just installed it today. Everything seems to be working fine except email. My settings for email in web.config are:
<smtp>
<network host="smtp.mydomainname.com" port="25" defaultCredentials="true" userName="myemail@mydomainename.com" password="mypassword"/>
</smtp>
The exception I get from any function that sends email is "The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue a STARTTLS command first"
My ISP told me that its smtp server uses encryption with SSL (and still port 25). Could that be the problem? If so how can I get this to work with SSL ?
Thank you very much for any help....
albertpascua...
All-Star
17520 Points
3475 Posts
MVP
Re: Email not working with an SMTP server that has SSL?
Oct 21, 2006 11:47 PM|LINK
Al
My Blog
Annddrew
Member
237 Points
85 Posts
Re: Email not working with an SMTP server that has SSL?
Oct 22, 2006 12:14 AM|LINK
Thanks albertpascual for your quick answer. It's 2.0. Is the SSL flag you are talking about looks like the following:?
System.Net.Mail.SmtpClient mailClient = new System.Net.Mail.SmtpClient();
mailClient.EnableSsl = true;
Thanks
Annddrew
Member
237 Points
85 Posts
Re: Email not working with an SMTP server that has SSL?
Oct 22, 2006 01:17 PM|LINK
albertpascua...
All-Star
17520 Points
3475 Posts
MVP
Re: Email not working with an SMTP server that has SSL?
Oct 22, 2006 03:08 PM|LINK
Didn't do much!
Have fun programming!
Al
My Blog
Tomaszek
0 Points
2 Posts
Re: Email not working with an SMTP server that has SSL?
Dec 14, 2006 08:02 PM|LINK
Hi,
I see that I have the same problem as you only you already has sovled it. Could you tell me where exactly in code you heve set EnableSsl = true? On your Default page in code behind file? Or somewhere else? Many thanx in advance
ahari312
Member
10 Points
59 Posts
Re: Email not working with an SMTP server that has SSL?
Feb 14, 2007 05:13 PM|LINK
Hi I am trying toget my mail working on my classified site and I came across your post...
I am having a similar problem... everything works fine except my email .. when you click on the "Respond to Ad" link I get an error that says "email not sent"
I have had a couple of suggestions on how to fix it but when I ask further questions they go unanswered. This is my first asp site so I am very new to asp..
I was wondering if you could possibly answer a question for me....
I was told I could fix my email with the following code....
<
system.net>
<
mailSettings>
<
smtp deliveryMethod="Network" from="user_name@domain.co.uk">
<
network host="mailserver.domain.co.uk" port="25" userName="user_name@domain.co.uk" password="password" defaultCredentials="true"/>
</
smtp>
</
mailSettings>
</
system.net>
Then
Dim
maFrom As New MailAddress("user@domain.co.uk")Dim
maTo As New MailAddress("blah@blah.com")Dim
m As New MailMessage(maFrom, maTo)Dim smtp As New SmtpClient()
smtp.UseDefaultCredentials =
True
smtp.Send(m)
but where does the code from the word Then go? I don't think it goes in the web.config file.... and Is the first ewmail address the address that I want them to respond to? Where do I get the second email addresss?
Any help would be most appreciated?
thanks
tcblues
Member
17 Points
56 Posts
Re: Email not working with an SMTP server that has SSL?
Apr 22, 2007 06:09 PM|LINK
The problem for me it's because I'm using the .NET login controls and I need to send mails only changing the SSL attribute in the web.config but I don't the name of the attribute and how to use it.
I hope somebody can help me.
Thank you.
ssl email smtp web.config
http://tcberglind.blogspot.com
elbotsik
Member
16 Points
3 Posts
Re: Email not working with an SMTP server that has SSL?
Jul 02, 2007 09:30 AM|LINK
I am still looking on to how to enable ssl via the web.config but I am starting to believe there is no such option...
All I got from http://www.systemnetmail.com/faq/4.5.aspx is that the defaultCredentials won't work that well with the enableSsl.
elbotsik
Member
16 Points
3 Posts
Re: Email not working with an SMTP server that has SSL?
Jul 02, 2007 10:35 AM|LINK
Why do you specify in the config file the username and the password since you are using defaultCredentials? These two elements are used only if you specify defaultCredentials="false" (which is the default value)