Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 26th, 2004, 12:28 PM
Registered User
 
Join Date: May 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default sending emails from vb.Net

I used SMTPMail class to send emails from vb.net application.Those emails never showed up in the the inbox (I have aol email) though they were in the queue folder on my computer.I set SMTPserver name
to "local host".What am I doing wrong?

Reply With Quote
  #2 (permalink)  
Old May 26th, 2004, 12:58 PM
Friend of Wrox
Points: 3,489, Level: 24
Points: 3,489, Level: 24 Points: 3,489, Level: 24 Points: 3,489, Level: 24
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Central, NJ, USA.
Posts: 1,102
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Your SMTP server name sounds wrong.

Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee
Reply With Quote
  #3 (permalink)  
Old May 27th, 2004, 03:45 AM
Authorized User
 
Join Date: May 2004
Location: , , .
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Make the Server Name "localhost" without space

Reply With Quote
  #4 (permalink)  
Old May 27th, 2004, 08:25 AM
Friend of Wrox
Points: 3,489, Level: 24
Points: 3,489, Level: 24 Points: 3,489, Level: 24 Points: 3,489, Level: 24
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Central, NJ, USA.
Posts: 1,102
Thanks: 0
Thanked 2 Times in 2 Posts
Default

I dissagree here COMPLETELY. He should use the actual server name- which is why I didn't tell him to use Localhost.


Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee
Reply With Quote
  #5 (permalink)  
Old May 27th, 2004, 08:43 AM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

While I would normally agree with Hal, that you should use the actual mail server name, there are some situations where you may not be able to do so:

1) You are in a team environment, and you need to use "localhost" because the same code is running on multiple development machines. In some cases you would have a local mail server available that handles real mail, and you would use this. However, if your normal mail server is off-site and therefore only accessed over the public internet, you might not be able to perform mail relay without a previous POP operation that authenticated the connection.

2) You are running the code on a web host where you don't know the name of the actual machine (or it may change when the host moves things around without you knowing). Case in point: I recently received a notice that all code posting mail to mail.<mywebsite>.com must be changed to use "localhost" instead.

Your circumstances may require the use of "localhost". Part of your problem might be that the receiving email server (AOL) is not allowing the mail in because it might not think that the caller (your machine) is a valid mail server, so it regards the mail relay attempt as bogus. Here is where Hal's suggestion does apply. You might need to try a "real" mail server to see if that is the problem.

Peter
-------------------------
Work smarter, not harder
Reply With Quote
  #6 (permalink)  
Old May 27th, 2004, 08:53 AM
Friend of Wrox
Points: 3,489, Level: 24
Points: 3,489, Level: 24 Points: 3,489, Level: 24 Points: 3,489, Level: 24
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Central, NJ, USA.
Posts: 1,102
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Peter, I always try to code my emails to use the public DNS names- (EG: mail.<domain>.com) in order to prevent a problem if connectivity changes.. servers change.. whatever. I don't want my program to die because someone in engineering gets an itch to rebuild an exchange server...

If I need to use a dev/test version I use a config file with both addresses and use a setting in it to tell the program which to use.



Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reading Emails from outlook using VB.net g_vamsi_krish ASP.NET 1.0 and 1.1 Basics 0 August 2nd, 2006 04:19 AM
send MASS Emails in ASP.NET 2 with VB.NET 2005 alexdcosta ASP.NET 2.0 Basics 1 July 17th, 2006 12:31 AM
Sending automatic emails maitias C# 2005 3 March 3rd, 2006 09:51 PM
Sending emails from smartphone application. unprsandeep C# 0 March 24th, 2005 02:01 PM
Sending automatic emails in Access marcin2k Access VBA 10 March 6th, 2005 03:48 PM



All times are GMT -4. The time now is 08:16 PM.


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