Wrox Programmer Forums
|
BOOK: Professional ASP.NET 1.0, Special Edition/1.1
This is the forum to discuss the Wrox book Professional ASP.NET 1.1 by Alex Homer, Dave Sussman, Rob Howard, Brian Francis, Karli Watson, Richard Anderson; ISBN: 9780764558900
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET 1.0, Special Edition/1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 23rd, 2004, 11:53 AM
Authorized User
 
Join Date: Apr 2004
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem using SmtpMail.send( )

Hi,

I have a web application that's sending mail through a SMTP server lets say 'server1'. Now I wanted to change the smtp server to another server say 'server2'. So when I do that it throws a System.Runtime.InteropServices.COM Exception saying 'The server rejected one or more recipient addresses'. When I change back the servername to 'server1' it works fine.

Neither server1 nor server2 is the server hosting the web application.

Here is the code:

System.Web.Mail.SmtpMail.SmtpServer="smtp.server1. com";
System.Web.Mail.SmtpMail.Send("[email protected] ", "[email protected]", "subject", "body");

In the above code if I replace 'smtp.server1.com' with lets say 'smtp.server2.com' and '[email protected]' with '[email protected]' it gives me an error.

Now I know that both smtp.server1.com and smtp.server2.com are reachable since I can send mail through these accounts configured in MS Outlook.

Can anyone please help? Also do I need to pass my username and password to logon to these servers to send mail through them? If yes then how do I do that? and how come the first server doesnt require this sort of authentication?

Thank you in advance.
qadeer

 
Old June 24th, 2004, 03:02 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Is server1 and 2 on the same network?

 
Old July 2nd, 2004, 10:27 AM
Authorized User
 
Join Date: Apr 2004
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

No they are on different networks.. infact they are mail servers of two differnt ISP's...

 
Old July 5th, 2004, 01:26 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 331
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to qazi_nomi
Default

Dear Qadeer I think there is the configration problem with server1 and server2 or they dont support SMTP. For this you can contact with server administrator for this

Cheers











Love 4 all
 
Old August 16th, 2004, 03:54 PM
Authorized User
 
Join Date: Jun 2003
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Is there an artical somewhere on how to have a windows form application send email? I am having a hard time figuring it out via the help docs.

Thanks

Ray





Similar Threads
Thread Thread Starter Forum Replies Last Post
About SmtpMail.Send() Method hhkris4u ASP.NET 1.0 and 1.1 Professional 3 February 6th, 2007 04:24 AM
email without SmtpMail.Send method??? thomaz C# 3 April 1st, 2006 10:41 AM
error with smtpMail.Send(MyMail) frankv25 ASP.NET 1.0 and 1.1 Professional 4 January 3rd, 2005 03:53 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.