i'm sorry for bugging you with this email form but i need it done.
i have some code that is executes at the press of a button:
System.Net.Mail.SmtpClient EmailMessage = new System.Net.Mail.SmtpClient();
EmailMessage.Host = "smtp.gmail.com";
EmailMessage.Send(FromAddress.Text, "mensuur@dotnet.itags.org.gmail.com", "** BRUNEL
WEBSITE CONTACT E-MAIL **", "Name: " + FullName.Text + "\n\nE-mail Address: "
+ FromAddress.Text + "\n\nMessage:\n\n" + EMailMessage.Text);
Sorry for the bad presentation.
EmailMessage is the System.Net.Mail.SmtpClient
EMailMessage is the textbox with the message text in it
FullName is a textbox in which one enters ones full name
FromAddress is the email address that is sending it to me
when i push the button, i get an SmtpException. i dont know what it is/does
and i dont know how to handle it. can anyone help me with this exception?
thanks in advance
--
Look Out!
Helter Skelter
Yellow Submarine
Pepperland
PS. Get Back!What's the actual exception? What's the message?
If you don't know, you could simpy wrap the code in a try, and spit out the
exception in a catch for debugging.
Karl
--
http://www.openmymind.net/
"Helter Skelter" <HelterSkelter@.discussions.microsoft.com> wrote in message
news:CABCDE5F-AD10-4894-843C-DA7A87155D96@.microsoft.com...
> hi everyone,
> i'm sorry for bugging you with this email form but i need it done.
> i have some code that is executes at the press of a button:
> System.Net.Mail.SmtpClient EmailMessage = new
> System.Net.Mail.SmtpClient();
> EmailMessage.Host = "smtp.gmail.com";
> EmailMessage.Send(FromAddress.Text, "mensuur@.gmail.com", "** BRUNEL
> WEBSITE CONTACT E-MAIL **", "Name: " + FullName.Text + "\n\nE-mail
> Address: "
> + FromAddress.Text + "\n\nMessage:\n\n" + EMailMessage.Text);
> Sorry for the bad presentation.
> EmailMessage is the System.Net.Mail.SmtpClient
> EMailMessage is the textbox with the message text in it
> FullName is a textbox in which one enters ones full name
> FromAddress is the email address that is sending it to me
> when i push the button, i get an SmtpException. i dont know what it
> is/does
> and i dont know how to handle it. can anyone help me with this exception?
> thanks in advance
> --
> Look Out!
> Helter Skelter
> Yellow Submarine
> Pepperland
> PS. Get Back!
Given that your host is smtp.gmail.com, I would find it quite amazing that
Google would allow relaying through their mail server. In other words, you
probably are not getting through since relaying is not available on your
SMTP server.
Suggestion: Try use 127.0.0.1 as your SMTP host instead.
--
Christopher A. Reed
"The oxen are slow, but the earth is patient."
"Helter Skelter" <HelterSkelter@.discussions.microsoft.com> wrote in message
news:CABCDE5F-AD10-4894-843C-DA7A87155D96@.microsoft.com...
> hi everyone,
> i'm sorry for bugging you with this email form but i need it done.
> i have some code that is executes at the press of a button:
> System.Net.Mail.SmtpClient EmailMessage = new
> System.Net.Mail.SmtpClient();
> EmailMessage.Host = "smtp.gmail.com";
> EmailMessage.Send(FromAddress.Text, "mensuur@.gmail.com", "** BRUNEL
> WEBSITE CONTACT E-MAIL **", "Name: " + FullName.Text + "\n\nE-mail
> Address: "
> + FromAddress.Text + "\n\nMessage:\n\n" + EMailMessage.Text);
> Sorry for the bad presentation.
> EmailMessage is the System.Net.Mail.SmtpClient
> EMailMessage is the textbox with the message text in it
> FullName is a textbox in which one enters ones full name
> FromAddress is the email address that is sending it to me
> when i push the button, i get an SmtpException. i dont know what it
> is/does
> and i dont know how to handle it. can anyone help me with this exception?
> thanks in advance
> --
> Look Out!
> Helter Skelter
> Yellow Submarine
> Pepperland
> PS. Get Back!
I just figured that was a dummy host for our benefit :)
--
http://www.openmymind.net/
http://www.fuelindustries.com/
"Christopher Reed" <carttu@.nospam.nospam> wrote in message
news:Oj6iOK8MGHA.2176@.TK2MSFTNGP10.phx.gbl...
> Given that your host is smtp.gmail.com, I would find it quite amazing that
> Google would allow relaying through their mail server. In other words,
> you probably are not getting through since relaying is not available on
> your SMTP server.
> Suggestion: Try use 127.0.0.1 as your SMTP host instead.
> --
> Christopher A. Reed
> "The oxen are slow, but the earth is patient."
> "Helter Skelter" <HelterSkelter@.discussions.microsoft.com> wrote in
> message news:CABCDE5F-AD10-4894-843C-DA7A87155D96@.microsoft.com...
>> hi everyone,
>>
>> i'm sorry for bugging you with this email form but i need it done.
>>
>> i have some code that is executes at the press of a button:
>>
>> System.Net.Mail.SmtpClient EmailMessage = new
>> System.Net.Mail.SmtpClient();
>> EmailMessage.Host = "smtp.gmail.com";
>> EmailMessage.Send(FromAddress.Text, "mensuur@.gmail.com", "**
>> BRUNEL
>> WEBSITE CONTACT E-MAIL **", "Name: " + FullName.Text + "\n\nE-mail
>> Address: "
>> + FromAddress.Text + "\n\nMessage:\n\n" + EMailMessage.Text);
>>
>> Sorry for the bad presentation.
>> EmailMessage is the System.Net.Mail.SmtpClient
>> EMailMessage is the textbox with the message text in it
>> FullName is a textbox in which one enters ones full name
>> FromAddress is the email address that is sending it to me
>>
>> when i push the button, i get an SmtpException. i dont know what it
>> is/does
>> and i dont know how to handle it. can anyone help me with this exception?
>>
>> thanks in advance
>> --
>> Look Out!
>>
>> Helter Skelter
>> Yellow Submarine
>> Pepperland
>>
>> PS. Get Back!
Check my blog:
http://spaces.msn.com/sholliday/
the
2/8/2006
While my blog is more info than you're looking for, imbedded in the examples
are
1.1 code using smtp.gmail.com
and
2.0 code using smtp.gmail.com
Believe or not, my tests show that 1.1 and 2.0 need different port numbers.
My smtp configuration handler is .... (if I can be so bold) ... very clean
and very nice.
...
Sloan
"Helter Skelter" <HelterSkelter@.discussions.microsoft.com> wrote in message
news:CABCDE5F-AD10-4894-843C-DA7A87155D96@.microsoft.com...
> hi everyone,
> i'm sorry for bugging you with this email form but i need it done.
> i have some code that is executes at the press of a button:
> System.Net.Mail.SmtpClient EmailMessage = new
System.Net.Mail.SmtpClient();
> EmailMessage.Host = "smtp.gmail.com";
> EmailMessage.Send(FromAddress.Text, "mensuur@.gmail.com", "**
BRUNEL
> WEBSITE CONTACT E-MAIL **", "Name: " + FullName.Text + "\n\nE-mail
Address: "
> + FromAddress.Text + "\n\nMessage:\n\n" + EMailMessage.Text);
> Sorry for the bad presentation.
> EmailMessage is the System.Net.Mail.SmtpClient
> EMailMessage is the textbox with the message text in it
> FullName is a textbox in which one enters ones full name
> FromAddress is the email address that is sending it to me
> when i push the button, i get an SmtpException. i dont know what it
is/does
> and i dont know how to handle it. can anyone help me with this exception?
> thanks in advance
> --
> Look Out!
> Helter Skelter
> Yellow Submarine
> Pepperland
> PS. Get Back!
0 comments:
Post a Comment