email help

sudu hawa

Well-known member
  • Dec 1, 2011
    1,626
    100
    63
    machanla mata ek yaluwak dunu email php code ekak thamai me


    $to = "$email"; //the address the email is being sent to
    $subject = "sub"; //the subject of the message
    $msg = "me $_POST[First]:\n".
    "-----------------------------------------------------\n".

    "thaks ms ekata \n". mata onne message eketa image ekak daganan??? podak kiyala denwada danan aya innwanma plz help me

    "-----------------------------------------------------\n";

    mail($to, $subject, $msg, 'From: yoursite.com <[email protected]>');

    }
    ?>
     
    Last edited:

    Pink panther

    Well-known member
  • Nov 8, 2011
    23,234
    3,133
    113
    35
    ~ ση тнє ƒℓσω ~
    3dflagsfawm.gif

    ...අභිමානවත් නිදහසක්...

    fsvT.jpeg


     

    miyuru4u

    Well-known member
  • Jan 18, 2007
    31,888
    10,486
    113
    In the eyes of my girl
    Code:
    $to= "[email protected]"; 
    
    $subject = "Subject of the email"; 
    $image = "link to image"; 
    
    // Create a boundary string. It needs to be unique 
    $sep = sha1(date('r', time())); 
    
    // Add in our content boundary, and mime type specification: 
    $headers .="Content-Type: multipart/related; 
    type=\"multipart/alternative\"; 
    boundary=\"PHP-001-{$sep}\"\r\n"; 
    
    if(!file_exists($image)) 
    die("No image found!"); 
    
    $attachment = file_get_contents($image); 
    $encoded = base64_encode($attachment); 
    $attached = chunk_split($encoded); 
    
    // additional headers 
    $headers .="MIME-Version: 1.0\r\n"; 
    $headers .= "From: Someone <[email protected]>\r\n"; 
    $headers .= "Reply-to: Someone <[email protected]>\r\n"; 
    
    $body =<<<eobody <br="">--PHP-001-{$sep} 
    Content-Type: multipart/alternative; 
    boundary="PHP-002-{$sep}" 
    
    --PHP-002-{$sep} 
    Content-Type: text/plain; charset="iso-8859-2" 
    Content-Transfer-Encoding: quoted-printable 
    
    Not html text here 
    
    --PHP-002-{$sep} 
    Content-Type: text/html; charset="iso-8859-2" 
    Content-Transfer-Encoding: quoted-printable 
    
    
    
    <meta charset="3Diso-8859-2"" content="3D"text/html;" http-equiv="3D"Content-Type""> 
    <meta 8.00.6001.18828"="" content="3D"MSHTML" name="3D"GENERATOR""> 
    <style> 
    body{text-align:center;width:100%;position:relative} 
    div{margin:0 auto;width:699px} 
    </style> 
    <title>Image mail</title> 
    
    
    
    <div> 
    <img alt="3D"Zaproszenie"" border="3D"0"" height="3D"200"" src="3D"cid:PHP-CID-{$sep}-1"" width="3D"200""> 
    </div> 
    
    
    
    
    --PHP-002-{$sep}-- 
    
    --PHP-001-{$sep} 
    Content-Type: image/jpeg; 
    name="image.jpg" 
    Content-Transfer-Encoding: base64 
    Content-ID: <php-cid-{$sep}-1> 
    
    {$attached} 
    
    --PHP-001-{$sep}-- 
    EOBODY; 
    
    // Finally, send the email 
    if(@mail($to, $subject, $body, $headers)) 
    { 
    print "Sended to ${to}!
    "; 
    } 
    //----------- 
    I have used Outlook Express 'Show source' to make sure this is correct.. I hope it's correct. Free to use! 
    </php-cid-{$sep}-1></eobody></[email protected]></[email protected]>
     

    sudu hawa

    Well-known member
  • Dec 1, 2011
    1,626
    100
    63
    Code:
    $to= "[email protected]"; 
    
    $subject = "Subject of the email"; 
    $image = "link to image"; 
    
    // Create a boundary string. It needs to be unique 
    $sep = sha1(date('r', time())); 
    
    // Add in our content boundary, and mime type specification: 
    $headers .="Content-Type: multipart/related; 
    type=\"multipart/alternative\"; 
    boundary=\"PHP-001-{$sep}\"\r\n"; 
    
    if(!file_exists($image)) 
    die("No image found!"); 
    
    $attachment = file_get_contents($image); 
    $encoded = base64_encode($attachment); 
    $attached = chunk_split($encoded); 
    
    // additional headers 
    $headers .="MIME-Version: 1.0\r\n"; 
    $headers .= "From: Someone <[email protected]>\r\n"; 
    $headers .= "Reply-to: Someone <[email protected]>\r\n"; 
    
    $body =<<<eobody <br="">--PHP-001-{$sep} 
    Content-Type: multipart/alternative; 
    boundary="PHP-002-{$sep}" 
    
    --PHP-002-{$sep} 
    Content-Type: text/plain; charset="iso-8859-2" 
    Content-Transfer-Encoding: quoted-printable 
    
    Not html text here 
    
    --PHP-002-{$sep} 
    Content-Type: text/html; charset="iso-8859-2" 
    Content-Transfer-Encoding: quoted-printable 
    
    
    
    <meta charset="3Diso-8859-2"" content="3D"text/html;" http-equiv="3D"Content-Type""> 
    <meta 8.00.6001.18828"="" content="3D"MSHTML" name="3D"GENERATOR""> 
    <style> 
    body{text-align:center;width:100%;position:relative} 
    div{margin:0 auto;width:699px} 
    </style> 
    <title>Image mail</title> 
    
    
    
    <div> 
    <img alt="3D"Zaproszenie"" border="3D"0"" height="3D"200"" src="3D"cid:PHP-CID-{$sep}-1"" width="3D"200""> 
    </div> 
    
    
    
    
    --PHP-002-{$sep}-- 
    
    --PHP-001-{$sep} 
    Content-Type: image/jpeg; 
    name="image.jpg" 
    Content-Transfer-Encoding: base64 
    Content-ID: <php-cid-{$sep}-1> 
    
    {$attached} 
    
    --PHP-001-{$sep}-- 
    EOBODY; 
    
    // Finally, send the email 
    if(@mail($to, $subject, $body, $headers)) 
    { 
    print "Sended to ${to}!
    "; 
    } 
    //----------- 
    I have used Outlook Express 'Show source' to make sure this is correct.. I hope it's correct. Free to use! 
    </php-cid-{$sep}-1></eobody></[email protected]></[email protected]>

    pahadili na bn
     

    delmar

    Well-known member
  • Oct 29, 2007
    27,267
    3,856
    113
    හැමතැනම
    machan....
    e msg ekata normal HTML image tags daapan...
    but img src eka denakota full url eka deepan...
    ex : <img src="http://www.elakiri.com/images/delmar.gif">
    not <img src =""images/delmar.gif"
     

    sudu hawa

    Well-known member
  • Dec 1, 2011
    1,626
    100
    63
    machan....
    e msg ekata normal HTML image tags daapan...
    but img src eka denakota full url eka deepan...
    ex : <img src="http://www.elakiri.com/images/delmar.gif">
    not <img src =""images/delmar.gif"

    a machan athe wada na bn