Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Email sending problem from asp.net application

Reply
Thread Tools

Email sending problem from asp.net application

 
 
Santosh
Guest
Posts: n/a
 
      03-22-2007
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="(E-Mail Removed)";
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.

 
Reply With Quote
 
 
 
 
Aidy
Guest
Posts: n/a
 
      03-22-2007
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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="(E-Mail Removed)";
> 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.
>



 
Reply With Quote
 
 
 
 
Mark Rae
Guest
Posts: n/a
 
      03-22-2007
"Santosh" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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="(E-Mail Removed)";
> 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


 
Reply With Quote
 
Santosh
Guest
Posts: n/a
 
      03-22-2007
On Mar 22, 3:51 pm, "Aidy" <(E-Mail Removed)> wrote:
> 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" <(E-Mail Removed)> wrote in message
>
> news:(E-Mail Removed) 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="(E-Mail Removed)";
> > 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 ="(E-Mail Removed)";
newMessage.To="(E-Mail Removed)";
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", "(E-Mail Removed)");
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

 
Reply With Quote
 
Mark Rae
Guest
Posts: n/a
 
      03-22-2007
"Santosh" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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...


 
Reply With Quote
 
Santosh
Guest
Posts: n/a
 
      03-24-2007
On Mar 22, 5:36 pm, "Mark Rae" <(E-Mail Removed)> wrote:
> "Santosh" <(E-Mail Removed)> wrote in message
>
> news:(E-Mail Removed) 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.

 
Reply With Quote
 
Mark Rae
Guest
Posts: n/a
 
      03-24-2007
"Santosh" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...

> On Mar 22, 5:36 pm, "Mark Rae" <(E-Mail Removed)> wrote:
>> "Santosh" <(E-Mail Removed)> wrote in message
>>
>> news:(E-Mail Removed) 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.


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...?


 
Reply With Quote
 
Santosh
Guest
Posts: n/a
 
      03-26-2007
On Mar 24, 7:11 pm, "Mark Rae" <(E-Mail Removed)> wrote:
> "Santosh" <(E-Mail Removed)> wrote in message
>
> news:(E-Mail Removed) oups.com...
>
>
>
>
>
> > On Mar 22, 5:36 pm, "Mark Rae" <(E-Mail Removed)> wrote:
> >> "Santosh" <(E-Mail Removed)> wrote in message

>
> >>news:(E-Mail Removed) roups.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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to get the correct email format when sending email using sqldatareader rote ASP .Net 8 04-17-2008 02:14 AM
Question about sending email in asp.net web application gnewsgroup ASP .Net 9 04-09-2008 05:20 PM
problem sending mail: Sending the email to the following server failed Luke Java 2 03-15-2007 10:54 AM
pls help me when i sent mail, it vil sending twice instead of once ,am using java.mail,am sending my code.... shailajabtech@gmail.com Java 0 09-28-2006 06:38 AM
Sending email from ASP.NET application. levon ASP .Net 1 06-12-2005 01:33 AM



Advertisments