Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Setting up Windows XP Professional to Send email

Posted on 2004-08-14
7
Medium Priority
?
248 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
  • 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
Independent Software Vendors: 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 750 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Ready to get certified? Check out some courses that help you prepare for third-party exams.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
Suggested Courses

885 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