Solved

Setting up Windows XP Professional to Send email

Posted on 2004-08-14
7
239 Views
Last Modified: 2012-06-21
Dear Expert,
   I have a Windows XP Box where I have an aspnet web project setup. The application provides the user with the ability to register and an email is generated and sent once the user is registered. My problem is the following:

1) I have set up my smtp server to relay from only my machine given the IP Address 127.0.0.1, the domain is my computer name, I have entered a masquerade domain as well as a fully qualified domain name. Everything worked perfectly, but when I upgraded my machine to Office 2003, It stop relaying email. After uninstalling office 2003 and reinstalling office 2000, I set up outlook with my usual ISP info, but still nothing. Is there something else that I need to do.

Regards

K
0
Comment
Question by:Khopkins32
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 18

Expert Comment

by:tusharashah
ID: 11802720
It seems that you are getting a well known SMTP Error Msg :550, which means Unable to relay for user xy. To be short the SMTP has verified that you are not allowed to send a mail with the current user.

Try adding this line anywhere before you send message.

>>> msg.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate",2);

it that dosnt help you, what error are you getting?

-tushar
0
 

Author Comment

by:Khopkins32
ID: 11822383
Hi tushar,
  Thanks for the response. Unfortunately, I am not getting any errors, At first the generated email where being stored in the \BadMail directory. I then decided to reinstall the smtp server again. Now all the contents contained within the folders of the mailroot directory are empty as they should be, but yet no email is generated.

Any suggestions would be greatly appreciated.

-K
0
 
LVL 18

Expert Comment

by:tusharashah
ID: 11842304
can you post your mailing code. you must be doing right, but i just want to put one doubt aside that there's something in code.

also try removing your IP address (127.0.0.1) from Relay Restriction & Select "All except the list below".  So we can put one more thing aside, that there's something to do with IP address

-tushar
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Khopkins32
ID: 11848741
This is a code snippet that I use to generate the email.

public void emailNewClientDefault()
{
   string body = string.Empty;                  
   this._password = this.getPassword();
            
  body += "Dear " + this._firstName + " " + this._lastName + ",<br><br>";
  body += "<br><br>Thank you for registering...." +
  "your login information:<br><br>";
  body += "User Name: " + this._eMail +"<br>";
  body += "Password:  " + this._password;
  body += "<br><br>Please note that usernames and passwords are case sensitive.";
  body += "<br>Once Logged in you have the option of updating your login information.";
  body += "<br><br><br>Best Regards,<br><br><br>";

  try
 {
    MailMessage msg = new MailMessage();
    msg.To = this._eMail;
    msg.From = "kevin.hopkins@kevolutions.com";
    msg.Subject = "Login Information from Linear Motion Systems";
    msg.BodyFormat = MailFormat.Html;
    msg.Body = body;
    SmtpMail.SmtpServer = "127.0.0.1";
    SmtpMail.Send(msg);
  }
 catch (Exception e)
 {
   throw e;
 }
 }

Let me know if this is helpful

-K            
0
 
LVL 18

Accepted Solution

by:
tusharashah earned 250 total points
ID: 11855714
Your code seems perfect!

Are you catcing "Exception e" anywhere else?

or just try to write Exception on TextBox rather then throwing it.
0
 
LVL 18

Expert Comment

by:tusharashah
ID: 11919416
What was the error?
0
 

Author Comment

by:Khopkins32
ID: 11930450
Thanks tusharashah,
  Like you mentioned my code was correct, which lead me to believe that something wrong on the receiver end. After doing some investigating, it turned out to be that the hotmail account that I was sending my test emails were being drop in my junk email folder. This was done automatically after microsoft up it storage capacity and incorporated a new filtering system. (Basically everything sent to it is consider junk until you specify otherwise). Thanks for your help.

-K
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question