I have downloadable code.
http://sholliday.spaces.live.com/Blog/cns!A68482B9628A842A!138.entry
there...with gmail specific settings as well.
Download the code. Change a couple of settings (Your username and password)
and it should work for you.
> Hi
>
[quoted text clipped - 49 lines]
> recovery control ?
> thanks
Try doing it with a chunky method:
using System;
using System.Collections.Generic;
using System.Text;
namespace PAB.SEO
{
public static class GmailSender
{
public static void SendGmail(string userName, string password,
string mailFrom,
string mailTo, string commaDelimCCs, string
subject, string message, bool isBodyHtml)
{
System.Net.Mail.MailMessage msg = new
System.Net.Mail.MailMessage(mailFrom, mailTo,
subject, message);
msg.IsBodyHtml = isBodyHtml;
if(commaDelimCCs!="")
msg.CC.Add(commaDelimCCs );
System.Net.NetworkCredential cred = new
System.Net.NetworkCredential(userName, password);
System.Net.Mail.SmtpClient mailClient = new
System.Net.Mail.SmtpClient("smtp.gmail.com", 587);
mailClient.EnableSsl = true;
mailClient.UseDefaultCredentials = false;
mailClient.Credentials = cred;
mailClient.Send(msg);
}
}
}
--Peter
Site: http://www.eggheadcafe.com
UnBlog: htp://petesbloggerama.blogspot.com
Short Urls & more: http://ittyurl.net
> Hi
>
[quoted text clipped - 49 lines]
> recovery control ?
> thanks
fredd00 - 20 Feb 2008 04:52 GMT
i'm still getting the error
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 f18sm8426670qba.14
but the emails seems to be sent anyway, i'm receiving my message
On Feb 18, 1:31 pm, Peter Bromberg [C# MVP]
<pbromb...@yahoo.NoSpamMaam.com> wrote:
> Try doing it with a chunky method:
>
[quoted text clipped - 88 lines]
> > recovery control ?
> > thanks
fredd00 - 20 Feb 2008 05:25 GMT
it actually works fine
the error is poped because i'm using the password recovery control,
which doesn't seem to like my network config
i simply cancel the event after sending the email through my email
method
thanks
On Feb 18, 1:31 pm, Peter Bromberg [C# MVP]
<pbromb...@yahoo.NoSpamMaam.com> wrote:
> Try doing it with a chunky method:
>
[quoted text clipped - 88 lines]
> > recovery control ?
> > thanks