Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

using godaddy as service I send the mail.  However, the mail do not appear at the To email address

Posted on 2013-12-14
12
Medium Priority
?
435 Views
Last Modified: 2014-01-02
using godaddy as service I send the mail.  However, the mail do not appear at the To email address.  Instead the mail appears in the in folder my email account on Godaddy on the application.

I would like to see the mail in the sent folder in my account and to the To email account.

Please help. Thanks


public static void sendmail(string strFrom, string strToName, string strTo, string strSubject, string strBody)
        {
            MailMessage EmailMsg = new MailMessage();
            EmailMsg.From = new MailAddress(strFrom,strFrom);
           
            EmailMsg.To.Add(new MailAddress(strToName, strTo));
            EmailMsg.Subject = strSubject;
            EmailMsg.Body = strBody;
            EmailMsg.IsBodyHtml = true;
            // EmailMsg.Priority = MailPriority.Normal;

            SmtpClient MailClient = new SmtpClient();
            MailClient.Send(EmailMsg);

            // HttpContext.Current.Response.Redirect("mailsent.aspx");

        }
0
Comment
Question by:goodk
[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
  • 5
  • 3
  • 2
12 Comments
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 39719408
None of the many emails I have sent from my Godaddy web site have ever ended up in my 'Sent Items' folder.  None of the ones that have sent with a desktop email client are there either.  Only the ones that you send thru the WebMail service end up there on their servers.

I was told by Godaddy at one time that either the To or the From address had to be a valid email account on Godaddy.  That's the way it seems to work on my Windows hosting there.  It looks like your code is C#.NET but it doesn't look complete.  This is the closest I could find to your code: http://msdn.microsoft.com/en-us/library/system.net.mail.mailmessage%28v=vs.110%29.aspx

I suggest you click on "Request Attention" and get the C# and .NET Topic Areas added to your question.  The Email Servers and Email Protocols Topic Areas are not really about writing code like this.
0
 

Author Comment

by:goodk
ID: 39720335
The code is typical and does not have any errors.  What I do not understand is how Godaddy software is set up to address email sent?
0
 

Author Comment

by:goodk
ID: 39732542
myCLib.gMail.sendmail("info@right-match.com","info@right-match.com","info@right-match.com", "teststrsubject", "teststrbody");
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!

 
LVL 54

Expert Comment

by:Scott Fell, EE MVE
ID: 39733934
You have this line

 EmailMsg.To.Add(new MailAddress(strToName, strTo));

and that needs to be an email address.  Trace what strTo is and that will be your answer.
0
 

Author Comment

by:goodk
ID: 39734316
padas, your answer is silly.
0
 
LVL 54

Expert Comment

by:Scott Fell, EE MVE
ID: 39734317
Sometimes the dumb things work....  

> mail do not appear at the To email address.  Instead the mail appears in the in folder my email account

If the mail is going to your own email address, the first thing to check is where you are sending it to.    Are you 100% sure the variable, 'strTo' is going to the email address you are expecting.  Or am I missing something else.
0
 

Author Comment

by:goodk
ID: 39735236
myCLib.gMail.sendmail("info@right-match.com","xxxx@yahoo.com","xxxx@yahoo.com", "teststrsubject", "teststrbody");


Where xxxx is only an example.

Can you verify if all the statement I wrote are correct to send the mail.  Do I need to provide any other outbound parameter for the mail outbound to work on godaddy server?  

Thanks
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 39735269
Yes, you need to identify the SMTP server.  Here is Godaddy's C# example that I just found: http://support.godaddy.com/help/article/1073/using-cdosys-to-send-email-from-your-windows-hosting-account
0
 
LVL 54

Accepted Solution

by:
Scott Fell,  EE MVE earned 1500 total points
ID: 39735320
In your original code you have to top, and the bottom is what you just posted.  Notice they are not the same format.   This is way I like to be silly and start with the most basic first.   I use CDO to send mail all the time although not in C but is is very similar.  

The top looks like you have a function for MailAddress and the bottom looks like you have a function for sendmail.  Which is the actual function you are using and what does each field do?  

I assume the bottom is the actual and I see 5 fields being passed.  I assume in order you have:
From:info@right-match.com
To_Name:xxxx@yahoo.com
To_Email:xxxx@yahoo.com
Subject:teststrsubject
Body:teststrbody

When testing are you using your own xxxx@yahoo.com? or by mistake is the "to" field, nfo@right-match.com?

 EmailMsg.To.Add(new MailAddress(strToName, strTo));

myCLib.gMail.sendmail("info@right-match.com","xxxx@yahoo.com","xxxx@yahoo.com", "teststrsubject", "teststrbody");
0
 

Author Closing Comment

by:goodk
ID: 39752296
I had everything correct.

It appear that the out email address GoDaddy has assigned is not part of the web account.  It is still map to the main account.

I have talked to few people at Godaddy.com but I am getting a run around.

When I put out email address from other web account it works.

Thanks
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Preface In the first article: A Better Website Login System (http://www.experts-exchange.com/A_2902.html) I introduced the EE Collaborative Login System and its intended purpose. In this article I will discuss some of the design consideratio…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

604 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