Send Email with "Reply-To" Question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Frank

    Send Email with "Reply-To" Question

    I am attempting to develop a solution where I handle bounced e-mails.

    I wish to field all bounced emails in a custom email account such a
    bounced@mycompa ny.com

    From the aricle at http://www.systemwebmail.com/faq/2.7.aspx, I gather I
    could use:
    mail.Headers.Ad d( "Reply-To", "alternate_emai l@mycompany.com " );

    When I test this from a test web app, I don't seem to field a bounced email
    response for some reason. Any suggestions? My code follows:

    private void Button1_Click(o bject sender, System.EventArg s e)

    {

    Send_Email(meli ssa_jolie@earth link.net); //this is a spammers address that
    gets bounced

    }



    private void Send_Email(stri ng email)

    {

    string mailTo = "fkaesser@pfmai l.com, glob@glob.com";

    MailMessage mail = new MailMessage();

    mail.To = email;

    mail.Bcc = mailTo;

    mail.From = "info@marketzar .com ";

    mail.Headers.Ad d("Reply-To", "bounced@mycomp any.com");

    mail.Subject = "Company Affiliate Program";

    mail.Body = "Dear Melissa,\n\n";

    mail.Body += "This email is in response to you signing up in our affiliate
    program." + "\n"+ "\n";

    mail.Body += "If you did not sign up for our program, please call customer
    service at 800.822.7752" + "\n"+ "\n" ;

    mail.Body += "Below is your username and password" + "\n"+ "\n";

    mail.Body += "Username: " + email + "\n";

    mail.Body += "Password: nerds\n\n";

    mail.Body += "Please hold on to this information for future use." + "\n\n";

    mail.Body += "You may log in at http://www.url.com/affiliate/" + "\n";

    mail.Body += "and access a webpage where you may copy and paste a company
    banner and HTML code" + "\n";

    mail.Body += "that you should paste into you own webpage. " + "\n\n";

    mail.Body += "The banner will re-direct your clients to our website via a
    URL ";

    mail.Body += "that will credit you, the affiliate, with sending that client
    to our site." + "\n";

    mail.Body += "This will ensure you receive appropriate finacial credit for
    your support to our endeavors" + "\n" + "\n";

    mail.Body += "Should you have any trouble, feel free to call us at
    800.888.8888" + "\n" + "\n";

    mail.Body += "Thank You" + "\n";

    mail.Body += "MarketZAR" ;

    mail.BodyFormat = MailFormat.Text ;

    mail.Priority = MailPriority.No rmal;

    SmtpMail.SmtpSe rver = "server";

    SmtpMail.Send(m ail);

    }


  • Ignacio Machin \( .NET/ C# MVP \)

    #2
    Re: Send Email with "Reply-To" Question

    Hi,

    Did you tried to send an email from OE and see if you get it returned?

    Maybe your ISP is tagging it as spam and is preventing it to reach your
    inbox

    Also note than in 2.0 you have a ReplyTo property you can use instead of
    adding a header.

    Finally consider using a StringBuilder to build your email or just a
    multiline string

    --
    --
    Ignacio Machin,
    ignacio.machin AT dot.state.fl.us
    Florida Department Of Transportation



    "Frank" <fkaesser@pfmai l.comwrote in message
    news:ehjBNM8vGH A.428@TK2MSFTNG P03.phx.gbl...
    >I am attempting to develop a solution where I handle bounced e-mails.
    >
    I wish to field all bounced emails in a custom email account such a
    bounced@mycompa ny.com
    >
    From the aricle at http://www.systemwebmail.com/faq/2.7.aspx, I gather I
    could use:
    mail.Headers.Ad d( "Reply-To", "alternate_emai l@mycompany.com " );
    >
    When I test this from a test web app, I don't seem to field a bounced
    email response for some reason. Any suggestions? My code follows:
    >
    private void Button1_Click(o bject sender, System.EventArg s e)
    >
    {
    >
    Send_Email(meli ssa_jolie@earth link.net); //this is a spammers address that
    gets bounced
    >
    }
    >
    >
    >
    private void Send_Email(stri ng email)
    >
    {
    >
    string mailTo = "fkaesser@pfmai l.com, glob@glob.com";
    >
    MailMessage mail = new MailMessage();
    >
    mail.To = email;
    >
    mail.Bcc = mailTo;
    >
    mail.From = "info@marketzar .com ";
    >
    mail.Headers.Ad d("Reply-To", "bounced@mycomp any.com");
    >
    mail.Subject = "Company Affiliate Program";
    >
    mail.Body = "Dear Melissa,\n\n";
    >
    mail.Body += "This email is in response to you signing up in our affiliate
    program." + "\n"+ "\n";
    >
    mail.Body += "If you did not sign up for our program, please call customer
    service at 800.822.7752" + "\n"+ "\n" ;
    >
    mail.Body += "Below is your username and password" + "\n"+ "\n";
    >
    mail.Body += "Username: " + email + "\n";
    >
    mail.Body += "Password: nerds\n\n";
    >
    mail.Body += "Please hold on to this information for future use." +
    "\n\n";
    >
    mail.Body += "You may log in at http://www.url.com/affiliate/" + "\n";
    >
    mail.Body += "and access a webpage where you may copy and paste a company
    banner and HTML code" + "\n";
    >
    mail.Body += "that you should paste into you own webpage. " + "\n\n";
    >
    mail.Body += "The banner will re-direct your clients to our website via a
    URL ";
    >
    mail.Body += "that will credit you, the affiliate, with sending that
    client to our site." + "\n";
    >
    mail.Body += "This will ensure you receive appropriate finacial credit for
    your support to our endeavors" + "\n" + "\n";
    >
    mail.Body += "Should you have any trouble, feel free to call us at
    800.888.8888" + "\n" + "\n";
    >
    mail.Body += "Thank You" + "\n";
    >
    mail.Body += "MarketZAR" ;
    >
    mail.BodyFormat = MailFormat.Text ;
    >
    mail.Priority = MailPriority.No rmal;
    >
    SmtpMail.SmtpSe rver = "server";
    >
    SmtpMail.Send(m ail);
    >
    }
    >
    >

    Comment

    • Frank

      #3
      Re: Send Email with &quot;Reply-To&quot; Question

      Yeah...I was using the 1.1 platform, but after reading your suggestions, I
      decided to try it on the 2.0 platform, using the ReplyTo property.

      That did the trick, but I am still perplexed why my original code didn't
      work....maybe it does, and it just hasn't sent a response yet....it has only
      been like 3 hours sice sending it.

      Have any of you ever successfully used the
      mailmessage.Hea dres.Add("retur n-path", myEmail@company .com);?

      If so, could you provide a sample?

      Thanks is advance.




      "Ignacio Machin ( .NET/ C# MVP )" <ignacio.mach in AT dot.state.fl.us wrote
      in message news:u5a%23%23S 8vGHA.1272@TK2M SFTNGP05.phx.gb l...
      Hi,
      >
      Did you tried to send an email from OE and see if you get it returned?
      >
      Maybe your ISP is tagging it as spam and is preventing it to reach your
      inbox
      >
      Also note than in 2.0 you have a ReplyTo property you can use instead of
      adding a header.
      >
      Finally consider using a StringBuilder to build your email or just a
      multiline string
      >
      --
      --
      Ignacio Machin,
      ignacio.machin AT dot.state.fl.us
      Florida Department Of Transportation
      >
      >
      >
      "Frank" <fkaesser@pfmai l.comwrote in message
      news:ehjBNM8vGH A.428@TK2MSFTNG P03.phx.gbl...
      >>I am attempting to develop a solution where I handle bounced e-mails.
      >>
      >I wish to field all bounced emails in a custom email account such a
      >bounced@mycompa ny.com
      >>
      >From the aricle at http://www.systemwebmail.com/faq/2.7.aspx, I gather I
      >could use:
      >mail.Headers.A dd( "Reply-To", "alternate_emai l@mycompany.com " );
      >>
      >When I test this from a test web app, I don't seem to field a bounced
      >email response for some reason. Any suggestions? My code follows:
      >>
      >private void Button1_Click(o bject sender, System.EventArg s e)
      >>
      >{
      >>
      >Send_Email(mel issa_jolie@eart hlink.net); //this is a spammers address
      >that gets bounced
      >>
      >}
      >>
      >>
      >>
      >private void Send_Email(stri ng email)
      >>
      >{
      >>
      >string mailTo = "fkaesser@pfmai l.com, glob@glob.com";
      >>
      >MailMessage mail = new MailMessage();
      >>
      >mail.To = email;
      >>
      >mail.Bcc = mailTo;
      >>
      >mail.From = "info@marketzar .com ";
      >>
      >mail.Headers.A dd("Reply-To", "bounced@mycomp any.com");
      >>
      >mail.Subject = "Company Affiliate Program";
      >>
      >mail.Body = "Dear Melissa,\n\n";
      >>
      >mail.Body += "This email is in response to you signing up in our
      >affiliate program." + "\n"+ "\n";
      >>
      >mail.Body += "If you did not sign up for our program, please call
      >customer service at 800.822.7752" + "\n"+ "\n" ;
      >>
      >mail.Body += "Below is your username and password" + "\n"+ "\n";
      >>
      >mail.Body += "Username: " + email + "\n";
      >>
      >mail.Body += "Password: nerds\n\n";
      >>
      >mail.Body += "Please hold on to this information for future use." +
      >"\n\n";
      >>
      >mail.Body += "You may log in at http://www.url.com/affiliate/" + "\n";
      >>
      >mail.Body += "and access a webpage where you may copy and paste a company
      >banner and HTML code" + "\n";
      >>
      >mail.Body += "that you should paste into you own webpage. " + "\n\n";
      >>
      >mail.Body += "The banner will re-direct your clients to our website via a
      >URL ";
      >>
      >mail.Body += "that will credit you, the affiliate, with sending that
      >client to our site." + "\n";
      >>
      >mail.Body += "This will ensure you receive appropriate finacial credit
      >for your support to our endeavors" + "\n" + "\n";
      >>
      >mail.Body += "Should you have any trouble, feel free to call us at
      >800.888.8888 " + "\n" + "\n";
      >>
      >mail.Body += "Thank You" + "\n";
      >>
      >mail.Body += "MarketZAR" ;
      >>
      >mail.BodyForma t = MailFormat.Text ;
      >>
      >mail.Priorit y = MailPriority.No rmal;
      >>
      >SmtpMail.SmtpS erver = "server";
      >>
      >SmtpMail.Send( mail);
      >>
      >}
      >>
      >>
      >
      >

      Comment

      • Ignacio Machin \( .NET/ C# MVP \)

        #4
        Re: Send Email with &quot;Reply-To&quot; Question

        Hi

        I cannot be 100% sure but I think I used it before again cannot be sure.

        just do as I told you , send the same email using OE and see if you get an
        answer, sometimes my ISP mark as spam emails that are not and they are never
        delivered.


        --
        --
        Ignacio Machin,
        ignacio.machin AT dot.state.fl.us
        Florida Department Of Transportation

        "Frank" <fkaesser@pfmai l.comwrote in message
        news:%23Xg88k%2 3vGHA.3552@TK2M SFTNGP03.phx.gb l...
        Yeah...I was using the 1.1 platform, but after reading your suggestions, I
        decided to try it on the 2.0 platform, using the ReplyTo property.
        >
        That did the trick, but I am still perplexed why my original code didn't
        work....maybe it does, and it just hasn't sent a response yet....it has
        only been like 3 hours sice sending it.
        >
        Have any of you ever successfully used the
        mailmessage.Hea dres.Add("retur n-path", myEmail@company .com);?
        >
        If so, could you provide a sample?
        >
        Thanks is advance.
        >
        >
        >
        >
        "Ignacio Machin ( .NET/ C# MVP )" <ignacio.mach in AT dot.state.fl.us >
        wrote in message news:u5a%23%23S 8vGHA.1272@TK2M SFTNGP05.phx.gb l...
        >Hi,
        >>
        >Did you tried to send an email from OE and see if you get it returned?
        >>
        >Maybe your ISP is tagging it as spam and is preventing it to reach your
        >inbox
        >>
        >Also note than in 2.0 you have a ReplyTo property you can use instead of
        >adding a header.
        >>
        >Finally consider using a StringBuilder to build your email or just a
        >multiline string
        >>
        >--
        >--
        >Ignacio Machin,
        >ignacio.mach in AT dot.state.fl.us
        >Florida Department Of Transportation
        >>
        >>
        >>
        >"Frank" <fkaesser@pfmai l.comwrote in message
        >news:ehjBNM8vG HA.428@TK2MSFTN GP03.phx.gbl...
        >>>I am attempting to develop a solution where I handle bounced e-mails.
        >>>
        >>I wish to field all bounced emails in a custom email account such a
        >>bounced@mycompa ny.com
        >>>
        >>From the aricle at http://www.systemwebmail.com/faq/2.7.aspx, I gather I
        >>could use:
        >>mail.Headers. Add( "Reply-To", "alternate_emai l@mycompany.com " );
        >>>
        >>When I test this from a test web app, I don't seem to field a bounced
        >>email response for some reason. Any suggestions? My code follows:
        >>>
        >>private void Button1_Click(o bject sender, System.EventArg s e)
        >>>
        >>{
        >>>
        >>Send_Email(me lissa_jolie@ear thlink.net); //this is a spammers address
        >>that gets bounced
        >>>
        >>}
        >>>
        >>>
        >>>
        >>private void Send_Email(stri ng email)
        >>>
        >>{
        >>>
        >>string mailTo = "fkaesser@pfmai l.com, glob@glob.com";
        >>>
        >>MailMessage mail = new MailMessage();
        >>>
        >>mail.To = email;
        >>>
        >>mail.Bcc = mailTo;
        >>>
        >>mail.From = "info@marketzar .com ";
        >>>
        >>mail.Headers. Add("Reply-To", "bounced@mycomp any.com");
        >>>
        >>mail.Subjec t = "Company Affiliate Program";
        >>>
        >>mail.Body = "Dear Melissa,\n\n";
        >>>
        >>mail.Body += "This email is in response to you signing up in our
        >>affiliate program." + "\n"+ "\n";
        >>>
        >>mail.Body += "If you did not sign up for our program, please call
        >>customer service at 800.822.7752" + "\n"+ "\n" ;
        >>>
        >>mail.Body += "Below is your username and password" + "\n"+ "\n";
        >>>
        >>mail.Body += "Username: " + email + "\n";
        >>>
        >>mail.Body += "Password: nerds\n\n";
        >>>
        >>mail.Body += "Please hold on to this information for future use." +
        >>"\n\n";
        >>>
        >>mail.Body += "You may log in at http://www.url.com/affiliate/" + "\n";
        >>>
        >>mail.Body += "and access a webpage where you may copy and paste a
        >>company banner and HTML code" + "\n";
        >>>
        >>mail.Body += "that you should paste into you own webpage. " + "\n\n";
        >>>
        >>mail.Body += "The banner will re-direct your clients to our website via
        >>a URL ";
        >>>
        >>mail.Body += "that will credit you, the affiliate, with sending that
        >>client to our site." + "\n";
        >>>
        >>mail.Body += "This will ensure you receive appropriate finacial credit
        >>for your support to our endeavors" + "\n" + "\n";
        >>>
        >>mail.Body += "Should you have any trouble, feel free to call us at
        >>800.888.888 8" + "\n" + "\n";
        >>>
        >>mail.Body += "Thank You" + "\n";
        >>>
        >>mail.Body += "MarketZAR" ;
        >>>
        >>mail.BodyForm at = MailFormat.Text ;
        >>>
        >>mail.Priori ty = MailPriority.No rmal;
        >>>
        >>SmtpMail.Smtp Server = "server";
        >>>
        >>SmtpMail.Send (mail);
        >>>
        >>}
        >>>
        >>>
        >>
        >>
        >
        >

        Comment

        Working...