error '80040211': Problem with Godaddy server while sending email

Discussion in 'C#' started by bijujohn2003, Aug 20, 2009.

?

Where is the mistake?

Poll closed Nov 28, 2009.
  1. my code

    1 vote(s)
    100.0%
  2. godaddy server settings

    0 vote(s)
    0.0%
  3. Rediff does not allow it for some reasons?

    0 vote(s)
    0.0%
  4. Something else

    0 vote(s)
    0.0%
  1. #1
    I am getting error '80040211' when trying to send an email to a rediffmail.com id using a godaddy server. So far the problem is only with rediffmail.com ids, but this problem may be there for some other email addresses as well I guess. I have tested several other ids from yahoo, gmail etc. and all are delivered without any problem.

    The code that I am using is copied below:

    <%
    sendUrl="http://schemas.microsoft.com/cdo/configuration/sendusing"
    smtpUrl="http://schemas.microsoft.com/cdo/configuration/smtpserver"


    ' Set the mail server configuration
    Set objConfig=CreateObject("CDO.Configuration")
    objConfig.Fields.Item(sendUrl)=2 ' cdoSendUsingPort
    objConfig.Fields.Item(smtpUrl)="relay-hosting.secureserver.net"
    objConfig.Fields.Update


    ' Create and send the mail
    Set objMail=CreateObject("CDO.Message")
    ' Use the config object created above
    Set objMail.Configuration=objConfig



    emailbody = "Whatever it is"






    objMail.From="xxxx@mydomain.com"






    objMail.To="myemail@rediffmail.com"
    objMail.Subject="Testing my rediffmail problem "
    objMail.HTMLBody = emailbody
    objMail.fields.update
    objMail.Send
    response.write email_id & "<br>"




    %>

    The following text is shown when running my script

    error '80040211'

    /email_godaddy.asp, line 21


    Please provide any hints to sort out the issue.

    Thank you.
     
    bijujohn2003, Aug 20, 2009 IP
  2. sbglobal79

    sbglobal79 Banned

    Messages:
    724
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    55
    #2
    using System;
    using System.Data;
    using System.Configuration;
    using System.Collections;
    using System.Web;
    using System.Web.Security;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using System.Web.UI.WebControls.WebParts;
    using System.Web.UI.HtmlControls;
    using System.Net.Mail;
    using System.Net;


    public partial class query : System.Web.UI.Page
    {
    protected void Page_Load(object sender, EventArgs e)
    {


    }
    protected void Button1_Click(object sender, EventArgs e)
    {
    SmtpClient m = new SmtpClient("mail.domainname.com");

    MailAddress to = new MailAddress("to@domain.com");
    MailAddress from = new MailAddress("from@domain.com");
    MailMessage mm = new MailMessage(from, to);
    mm.Subject = "your subject ";

    mm.IsBodyHtml = true;
    m.Credentials = new NetworkCredential("from@domain.com", "password");
    mm.Body = " ";




    try
    {
    m.Send(mm);



    }
    catch (Exception ex)
    {

    }
    }
    }
     
    sbglobal79, Aug 22, 2009 IP