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
Solved

Setting up Windows XP Professional to Send email

Posted on 2004-08-14
7
238 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

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

The New “Normal” in Modern Enterprise Operations

DevOps for the modern enterprise offers many benefits — increased agility, productivity, and more, but digital transformation isn’t easy, especially if you’re not addressing the right issues. Register for the webinar to dive into the “new normal” for enterprise modern ops.

Question has a verified solution.

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

Suggested Solutions

An enjoyable and seamless user experience can go a long way on an eCommerce site. While a cohesive layout and engaging copy play roles in creating a positive user experience, some sites neglect aspects that seem marginal but in actuality prove very …
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?
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

856 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