Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
|
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 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 May 26th, 2004, 12:28 PM
Registered User
 
Join Date: May 2004
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?

 
Old May 26th, 2004, 12:58 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,101
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
 
Old May 27th, 2004, 03:45 AM
Authorized User
 
Join Date: May 2004
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Make the Server Name "localhost" without space

 
Old May 27th, 2004, 08:25 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,101
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
 
Old May 27th, 2004, 08:43 AM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
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
 
Old May 27th, 2004, 08:53 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,101
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





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





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