Mail sending problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AMT India
    New Member
    • Feb 2007
    • 64

    Mail sending problem

    I am sending mail using the below code]

    [code=php]
    $to = "rosh@yahoo.com ";
    $subject = "test mail";
    $headers = "MIME-Version: 1.0\r\n";
    $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
    $headers .= "From:<rosh@gma il.com>";
    $mail_sent = mail($to,$subje ct ,$msg,$headers) ;

    if($mail_sent)
    return true;
    else
    return false;
    [/code]

    but the mai getting only the html tag form
    Code:
    Content-type: text/html; charset=ISO-8859-1
    
    From:<rosh@gmail.com>
    Message-Id: <20080201170833.45F931AF0065@server8142.mivitec.net>
    Date: Fri,  1 Feb 2008 18:08:33 +0100 (CET)
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>@@weblog</title>
    <meta http-equiv=content-type content="text/html; charset=ISO-8859-1" />
    </head>
    
    
    
    <body bgcolor="#FFFFFF" topmargin="0" leftmargin="0">
    
    
    
     <table width="800px" cellpadding="0" cellspacing="0">
    
     <tr><td colspan="2"><a href="http://www.liebeundgesundheit.de/"
    target="_blank"><img
    src="http://www.liebeundgesundheit.de//img/head-lug-ora.jpg" border="0"
    /></a></td></tr>
    
     <tr>
    
      <td width="169px" bgcolor="#E0E0E0"></td>
    
      <td width="637px" style="PADDING:5px; TEXT-ALIGN:right;"><p
    style="FONT:12px Arial, Helvetica, sans-serif;">M&ouml;rfelden-Walldorf, den
    01-02-2008</p></td>
    
     </tr>
    
     <tr>
    
      <td width="170px" bgcolor="#E0E0E0"></td>
    
      <td width="637px" style="PADDING:10px;">
    
       <p style="FONT:bold 16px Arial, Helvetica, sans-serif;">Ihre Anmeldung
    zum Newsletter von <span
    style="COLOR:#FF6633;">liebeundgesundheit.de</span></p>
    
       <p style="FONT:13px Arial, Helvetica, sans-serif;">Sehr geehrte Herru Jan
    Krause,</p>
    
       <p style='FONT:13px Arial, Helvetica, sans-serif;'>vielen Dank f&uuml;r
    Ihre Anmeldung zum Newsletter von <span
    style='COLOR:#FF6633;'><b>liebe</b>und<b>gesundheit</b>.de</span>. Somit
    bleiben Sie immer auf dem Laufenden &uuml;ber neue Artikel, neue Fragen und
    Antworten und &uuml;ber spezielle Events.</p><p style='FONT:13px Arial,
    Helvetica, sans-serif;'>  Um Ihre Anmeldung zum Newsletter
    abzuschlie&szlig;en, klicken Sie bitte unten auf den Link, oder kopieren
    diesen in die URL-Zeile Ihres Browsers:<br /><a
    href=http://www.liebeundgesundheit.de/newsletter.html?action=subscribe&email
    =jvk@vinico.com&id=a87ff679a2f3e71d9181a67b7542122c
    > >http://www.liebeundgesundheit.de/newsletter.html?action=subscribe&email=jvk
    @vinico.com&id=a87ff679a2f3e71d9181a67b7542122c</a></p>
    
       <p style="FONT:13px Arial, Helvetica, sans-serif;">Herzlichst,<br />Ihr
    liebeundgesundheit.de-Team</p>
    
      </td>
    
     </tr>
    
    </table>
    
    <table width="800px" cellpadding="10px" cellspacing="0">
    
     <tr>
    
      <td valign="top"><p style="FONT:12px Arial, Helvetica, sans-serif;
    COLOR:#555555;">Silberlust GmbH<br />Gesch&auml;ftsf&uuml;hrer: Martin
    Kessel<br />Kelsterbacher Str. 28<br />64546 M&ouml;rfelden-Walldorf<br
    />Germany</p></td>
    
      <td valign="top"><p style="FONT:12px Arial, Helvetica, sans-serif;
    COLOR:#555555;">Tel: 06105 203720<br />Fax: 06105 455901<br />email: <a
    href="mailto:info@liebeundgesundheit.de">info@liebeundgesundheit.de</a><br
    />site: www.liebeundgesundheit.de</p></td>
    
      <td valign="top"><p style="FONT:12px Arial, Helvetica, sans-serif;
    COLOR:#555555;">Handelsregister Darmstadt HRB 54267<br />Ust-ID:
    DE812260688<br />Steuer-Nr: 00723724776</p></td>
    
     </tr>
    
    </table>
    
    </body>
    
    </html>

    Regards,
    AMT
  • rizwan6feb
    New Member
    • Jul 2007
    • 108

    #2
    What are you sending in the message? There can be problem with the HTML

    Comment

    • AMT India
      New Member
      • Feb 2007
      • 64

      #3
      messge in html format

      Comment

      • George Lft
        New Member
        • Dec 2007
        • 25

        #4
        you didn't include <?php, dude.

        i would not use that script, look for a different one. the mail() function should only be included after all the( php if else , etc. )

        Comment

        • nomad
          Recognized Expert Contributor
          • Mar 2007
          • 664

          #5
          Originally posted by AMT India
          I am sending mail using the below code]

          [code=php]
          $to = "rosh@yahoo.com ";
          $subject = "test mail";
          $headers = "MIME-Version: 1.0\r\n";
          $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
          $headers .= "From:<rosh@gma il.com>";
          $mail_sent = mail($to,$subje ct ,$msg,$headers) ;

          if($mail_sent)
          return true;
          else
          return false;
          [/code]

          but the mai getting only the html tag form
          Code:
          Content-type: text/html; charset=ISO-8859-1
           
          From:<rosh@gmail.com>
          Message-Id: <20080201170833.45F931AF0065@server8142.mivitec.net>
          Date: Fri, 1 Feb 2008 18:08:33 +0100 (CET)
           
          <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
          <html xmlns="http://www.w3.org/1999/xhtml">
          <head>
          <title>@@weblog</title>
          <meta http-equiv=content-type content="text/html; charset=ISO-8859-1" />
          </head>
           
           
           
          <body bgcolor="#FFFFFF" topmargin="0" leftmargin="0">
           
           
           
          <table width="800px" cellpadding="0" cellspacing="0">
           
          <tr><td colspan="2"><a href="http://www.liebeundgesundheit.de/"
          target="_blank"><img
          src="http://www.liebeundgesundheit.de//img/head-lug-ora.jpg" border="0"
          /></a></td></tr>
           
          <tr>
           
          <td width="169px" bgcolor="#E0E0E0"></td>
           
          <td width="637px" style="PADDING:5px; TEXT-ALIGN:right;"><p
          style="FONT:12px Arial, Helvetica, sans-serif;">M&ouml;rfelden-Walldorf, den
          01-02-2008</p></td>
           
          </tr>
           
          <tr>
           
          <td width="170px" bgcolor="#E0E0E0"></td>
           
          <td width="637px" style="PADDING:10px;">
           
          <p style="FONT:bold 16px Arial, Helvetica, sans-serif;">Ihre Anmeldung
          zum Newsletter von <span
          style="COLOR:#FF6633;">liebeundgesundheit.de</span></p>
           
          <p style="FONT:13px Arial, Helvetica, sans-serif;">Sehr geehrte Herru Jan
          Krause,</p>
           
          <p style='FONT:13px Arial, Helvetica, sans-serif;'>vielen Dank f&uuml;r
          Ihre Anmeldung zum Newsletter von <span
          style='COLOR:#FF6633;'><b>liebe</b>und<b>gesundheit</b>.de</span>. Somit
          bleiben Sie immer auf dem Laufenden &uuml;ber neue Artikel, neue Fragen und
          Antworten und &uuml;ber spezielle Events.</p><p style='FONT:13px Arial,
          Helvetica, sans-serif;'> Um Ihre Anmeldung zum Newsletter
          abzuschlie&szlig;en, klicken Sie bitte unten auf den Link, oder kopieren
          diesen in die URL-Zeile Ihres Browsers:<br /><a
          href=http://www.liebeundgesundheit.de/newsletter.html?action=subscribe&email
          =jvk@vinico.com&id=a87ff679a2f3e71d9181a67b7542122c
          > >http://www.liebeundgesundheit.de/newsletter.html?action=subscribe&email=jvk
          @vinico.com&id=a87ff679a2f3e71d9181a67b7542122c</a></p>
           
          <p style="FONT:13px Arial, Helvetica, sans-serif;">Herzlichst,<br />Ihr
          liebeundgesundheit.de-Team</p>
           
          </td>
           
          </tr>
           
          </table>
           
          <table width="800px" cellpadding="10px" cellspacing="0">
           
          <tr>
           
          <td valign="top"><p style="FONT:12px Arial, Helvetica, sans-serif;
          COLOR:#555555;">Silberlust GmbH<br />Gesch&auml;ftsf&uuml;hrer: Martin
          Kessel<br />Kelsterbacher Str. 28<br />64546 M&ouml;rfelden-Walldorf<br
          />Germany</p></td>
           
          <td valign="top"><p style="FONT:12px Arial, Helvetica, sans-serif;
          COLOR:#555555;">Tel: 06105 203720<br />Fax: 06105 455901<br />email: <a
          href="mailto:info@liebeundgesundheit.de">info@liebeundgesundheit.de</a><br
          />site: www.liebeundgesundheit.de</p></td>
           
          <td valign="top"><p style="FONT:12px Arial, Helvetica, sans-serif;
          COLOR:#555555;">Handelsregister Darmstadt HRB 54267<br />Ust-ID:
          DE812260688<br />Steuer-Nr: 00723724776</p></td>
           
          </tr>
           
          </table>
           
          </body>
           
          </html>

          Regards,
          AMT

          try doing this instead
          $EmailTo = emailname@here.com;



          nomad

          Comment

          • nomad
            Recognized Expert Contributor
            • Mar 2007
            • 664

            #6
            Lets try this again
            Try doing this
            $EmailTo = "yourname@ldomai nname.com";

            not $to = "yourname@ldomai nname.com";

            nomad

            Comment

            Working...