Skip to content

Имэйл илгээх үйлдэл

November 1, 2006

Вэбсофт Монгол ХХК-ын вэб боловсруулах программын эх кодыг та бүхэнд танилцуулж байна
function mail_send($name, $contact_mail,$email,$body ){
    $today = $date[‘year’].”-“.$date[‘mon’].”-“.$date[‘mday’];
    $to = “$contact_mail <$contact_mail>” . “, “;
    /* subject */
    $subject = “Вэбийн хаяг : Санал хүсэлт : $name “;
    $message = ”
    <style1>Вэбийн хаяг ХОЛБОО БАРИХ хуудас</style1>
    <p><strong>Санал хүсэлт илгээсэн:</strong><br />
    <strong>Санал хүсэлт:</strong>
     $body </td>
    <strong>Илгээсэн огноо:</strong>
     $today <br />
    Вэбийн нэр</td>
    $headers  = “WSMmail-Version: 1.2\r\n”;
    $headers .= “Content-type: text/html;  charset=utf-8\r\n”;
    $headers .= “WSMmail-Version: 1.0\r\n”;
    $headers .= “From: $email<“.$email.”>\r\n”;
    if(mail($to, $subject, $message, $headers))
    { // mail sent sss
    return true;
    } // mail sent eee
    { // mail do not sent sss
    return false;
    } // mail do not sent eee

One Comment leave one →
  1. February 27, 2008 9:00 am

    Энэ gmail ruu zugeer ochij chadaj baina uu.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: