469,900 Members | 1,583 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,900 developers. It's quick & easy.

Email sending problem from asp.net application

Dear all, i am wrtiing following code for the sending email from the
my asp application when i am working on the local machine i will work
fine ans send email on the mentioned address. but when i deploy it on
the server it doen not work. and also does not give any error.

MailMessage newMessage = new MailMessage();
newMessage.From =txtEmail.Text.Trim();
newMessage.To="sa************@vritti.co.in";
newMessage.Subject="Comments-Suggestion";
newMessage.Priority=System.Web.Mail.MailPriority.N ormal;
string msgBody = txtSuggestion.Text.Trim() ;
SmtpMail.Send(newMessage);
newMessage.Body = msgBody;
please tell me what is the problem with in it.
Regards,
Santosh Shinde.

Mar 22 '07 #1
7 2255
You need to specify how the mail is to be delivered. If you are using an
external SMTP server you need to specify, or if you are using IIS' SMTP
server you need to specify that too.

Google these for more info;

http://schemas.microsoft.com/cdo/con...tion/sendusing

http://schemas.microsoft.com/cdo/con...ickupdirectory

"Santosh" <Sa***************@yahoo.comwrote in message
news:11**********************@e65g2000hsc.googlegr oups.com...
Dear all, i am wrtiing following code for the sending email from the
my asp application when i am working on the local machine i will work
fine ans send email on the mentioned address. but when i deploy it on
the server it doen not work. and also does not give any error.

MailMessage newMessage = new MailMessage();
newMessage.From =txtEmail.Text.Trim();
newMessage.To="sa************@vritti.co.in";
newMessage.Subject="Comments-Suggestion";
newMessage.Priority=System.Web.Mail.MailPriority.N ormal;
string msgBody = txtSuggestion.Text.Trim() ;
SmtpMail.Send(newMessage);
newMessage.Body = msgBody;
please tell me what is the problem with in it.
Regards,
Santosh Shinde.

Mar 22 '07 #2
"Santosh" <Sa***************@yahoo.comwrote in message
news:11**********************@e65g2000hsc.googlegr oups.com...
Dear all, i am wrtiing following code for the sending email from the
my asp application when i am working on the local machine i will work
fine ans send email on the mentioned address. but when i deploy it on
the server it doen not work. and also does not give any error.

MailMessage newMessage = new MailMessage();
newMessage.From =txtEmail.Text.Trim();
newMessage.To="sa************@vritti.co.in";
newMessage.Subject="Comments-Suggestion";
newMessage.Priority=System.Web.Mail.MailPriority.N ormal;
string msgBody = txtSuggestion.Text.Trim() ;
SmtpMail.Send(newMessage);
newMessage.Body = msgBody;
please tell me what is the problem with in it.
How does it know where to find your SMTP queue...?
http://www.systemnetmail.com/faq/3.1.1.aspx
Mar 22 '07 #3
On Mar 22, 3:51 pm, "Aidy" <a...@noemail.xxxa.comwrote:
You need to specify how the mail is to be delivered. If you are using an
external SMTP server you need to specify, or if you are using IIS' SMTP
server you need to specify that too.

Google these for more info;

http://schemas.microsoft.com/cdo/con...tion/sendusing

http://schemas.microsoft.com/cdo/con...ickupdirectory

"Santosh" <Santoshmshinde...@yahoo.comwrote in message

news:11**********************@e65g2000hsc.googlegr oups.com...
Dear all, i am wrtiing following code for the sending email from the
my asp application when i am working on the local machine i will work
fine ans send email on the mentioned address. but when i deploy it on
the server it doen not work. and also does not give any error.
MailMessage newMessage = new MailMessage();
newMessage.From =txtEmail.Text.Trim();
newMessage.To="santosh.shi...@vritti.co.in";
newMessage.Subject="Comments-Suggestion";
newMessage.Priority=System.Web.Mail.MailPriority.N ormal;
string msgBody = txtSuggestion.Text.Trim() ;
SmtpMail.Send(newMessage);
newMessage.Body = msgBody;
please tell me what is the problem with in it.
Regards,
Santosh Shinde.- Hide quoted text -

- Show quoted text -
i am trying following code

MailMessage newMessage = new MailMessage();
newMessage.From =txtEmail.Text.Trim();
//newMessage.To ="in**@goloka.com.au";
newMessage.To="sa************@vritti.co.in";
newMessage.Subject="Comments-Suggestion";
newMessage.Priority=System.Web.Mail.MailPriority.N ormal;
string msgBody = txtSuggestion.Text.Trim() ;
newMessage.Body = msgBody;
SmtpMail.SmtpServer="gmail.com";
//SmtpMail.SmtpServer="127.0.0.1";
// Smtp configuration

//SmtpMail.SmtpServer = "smtp.yahoo.com";
// - smtp.gmail.com use smtp authentication
newMessage .Fields.Add("http://schemas.microsoft.com/cdo/
configuration/smtpauthenticate", "1");
newMessage.Fields.Add("http://schemas.microsoft.com/cdo/
configuration/sendusername", "my*****@gmail.com");
newMessage.Fields.Add("http://schemas.microsoft.com/cdo/
configuration/sendpassword", "mypassword");
// // - smtp.gmail.com use port 465 or 587
newMessage.Fields.Add("http://schemas.microsoft.com/cdo/
configuration/smtpserverport", "465");
// // - smtp.gmail.com use STARTTLS (some call this SSL)
newMessage.Fields.Add("http://schemas.microsoft.com/cdo/
configuration/smtpusessl", "true");
// try to send Mail
//newMessage.Fields.Add("http://schemas.microsoft.com/cdo/
configuration/smtpusessl", "true");
SmtpMail.Send(newMessage);
but it gives an error

Please tell me what is the problem. can there is any other way

Mar 22 '07 #4
"Santosh" <Sa***************@yahoo.comwrote in message
news:11**********************@e1g2000hsg.googlegro ups.com...
but it gives an error
I've never understood why people post on a technical newsgroup that they are
getting an error, but then not actually say what the error is...!!!
Please tell me what is the problem. can there is any other way
Please tell the newsgroup what the error is...
Mar 22 '07 #5
On Mar 22, 5:36 pm, "Mark Rae" <m...@markNOSPAMrae.comwrote:
"Santosh" <Santoshmshinde...@yahoo.comwrote in message

news:11**********************@e1g2000hsg.googlegro ups.com...
but it gives an error

I've never understood why people post on a technical newsgroup that they are
getting an error, but then not actually say what the error is...!!!
Please tell me what is the problem. can there is any other way

Please tell the newsgroup what the error is...
Sorry forget to mention the error the error is :

The transport failed to connect to the server.

Mar 24 '07 #6
"Santosh" <Sa***************@yahoo.comwrote in message
news:11**********************@b75g2000hsg.googlegr oups.com...
On Mar 22, 5:36 pm, "Mark Rae" <m...@markNOSPAMrae.comwrote:
>"Santosh" <Santoshmshinde...@yahoo.comwrote in message

news:11**********************@e1g2000hsg.googlegr oups.com...
but it gives an error

I've never understood why people post on a technical newsgroup that they
are
getting an error, but then not actually say what the error is...!!!
Please tell me what is the problem. can there is any other way

Please tell the newsgroup what the error is...

Sorry forget to mention the error the error is :

The transport failed to connect to the server.
There you go!

OK, so presumably you've done a normal Google search:
http://www.google.co.uk/search?sourc...+the+server%22

and none of the suggested solutions has worked...?
Mar 24 '07 #7
On Mar 24, 7:11 pm, "Mark Rae" <m...@markNOSPAMrae.comwrote:
"Santosh" <Santoshmshinde...@yahoo.comwrote in message

news:11**********************@b75g2000hsg.googlegr oups.com...


On Mar 22, 5:36 pm, "Mark Rae" <m...@markNOSPAMrae.comwrote:
"Santosh" <Santoshmshinde...@yahoo.comwrote in message
>news:11**********************@e1g2000hsg.googlegr oups.com...
but it gives an error
I've never understood why people post on a technical newsgroup that they
are
getting an error, but then not actually say what the error is...!!!
Please tell me what is the problem. can there is any other way
Please tell the newsgroup what the error is...
Sorry forget to mention the error the error is :
The transport failed to connect to the server.

There you go!

OK, so presumably you've done a normal Google search:http://www.google.co.uk/search?sourc...F-8&rls=GGLG,G...

and none of the suggested solutions has worked...?- Hide quoted text -

- Show quoted text -
ya i am trying all the options but not any one work and lastely search
on google.and getting help from google search.

Mar 26 '07 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

88 posts views Thread by Mike | last post: by
13 posts views Thread by joe215 | last post: by
5 posts views Thread by venky | last post: by
6 posts views Thread by \jason via DotNetMonster.com\ | last post: by
4 posts views Thread by Tony M | last post: by
31 posts views Thread by happyse27 | last post: by
1 post views Thread by Waqarahmed | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.