Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Search

 
Advanced search

28470 Posts in 7974 Topics- by 10280 Members - Latest Member: cid24
Opensource CMS Community ForumMambo Componentเขียน php ส่งเมล์ไป hotmail ไม่ได้ แต่ ใช้ comprofiler ส่งใด้เฉยเลย!
Pages: [1]   Go Down
Print
Author Topic: เขียน php ส่งเมล์ไป hotmail ไม่ได้ แต่ ใช้ comprofiler ส่งใด้เฉยเลย!  (Read 3936 times)
siyanaka
มือใหม่หัดโพส
*

Karma: 0
Offline Offline

Posts: 10


Email
« on: February 11, 2007, 12:00:08 am »

comprofiler สามารถส่งไป hotmail ได้ปรกติครับ
แต่พอเขียนเองแล้วใช้ไม่ได้เลย
ลอง htmlMimeMail แล้วก็เป็นเหมือนกันครับตอนนี้เลยงงไม่รู็เป็นที่อะไร แกะโค้ดของcomprofiler แล้วยังงงๆไม่เห็นมีอะไรแตกต่างกันมากมาย



ปล. gmail ส่งได้ปรกติครับ

ช่วยด้วยครับ Huh
Logged
i_am_keng
สิ่งที่หาไม่ได้ง่าย ๆ คือโอกาสทองของชีวิต
Global Moderator
เทพแห่งบอร์ด
*

Karma: 3
Offline Offline

Posts: 865


sc450617@at_hotmail_dot_com.com
WWW
« Reply #1 on: February 12, 2007, 01:40:43 pm »

Code:
<?php
//add From: header
$headers "From: webserver@localhost\r\n";

//specify MIME version 1.0
$headers .= "MIME-Version: 1.0\r\n";

//unique boundary
$boundary uniqid("HTMLDEMO");

//tell e-mail client this e-mail contains//alternate versions
$headers .= "Content-Type: multipart/mixed; boundary = $boundary\r\n\r\n";

//plain text version of message
$body "--$boundary\r\n" .
   
"Content-Type: text/plain; charset=ISO-8859-1\r\n" .
   
"Content-Transfer-Encoding: base64\r\n\r\n";
$body .= chunk_split(base64_encode("This is the plain text version!"));

//HTML version of message
$body .= "--$boundary\r\n" .
   
"Content-Type: text/html; charset=ISO-8859-1\r\n" .
   
"Content-Transfer-Encoding: base64\r\n\r\n";
$body .= chunk_split(base64_encode("This the <b>HTML</b> version!"));

//send message
mail("root@localhost""An HTML Message"$body$headers);
?>

ใช้โค้ดนี้ส่งได้แน่นอนครับ ลองปรับเปลี่ยน parameter ดูครับ
ที่มา http://www.php.net
Logged

www.cakephp.in.th
www.hotel-reservation.in.th

mambo laithai:www.mambohub.com
mambo dev:www.mambo-foundation.org
ywc#2
KConvert dev (convert character set)
www.keng-d.com
เที่ยวในไทย www.tour-in-thai.com
Keng:Suriya Kaewmungmuang
เก่ง:สุริยา แก้วมุงเมือง
siyanaka
มือใหม่หัดโพส
*

Karma: 0
Offline Offline

Posts: 10


Email
« Reply #2 on: February 13, 2007, 09:49:10 am »

จะลองดูครับ
Logged
siyanaka
มือใหม่หัดโพส
*

Karma: 0
Offline Offline

Posts: 10


Email
« Reply #3 on: February 13, 2007, 10:45:32 am »

ลองแล้วครับส่งได้ครับและอยู่ใน junck box


พอเปลี่ยน//add From: header

//add From: header
$headers = "From: xxxxxxx@hotmail.com\r\n";



,มันจะส่งไม่ได้อะครับ ทำไงดี ของความกรุณาด้วยครับ
Logged
i_am_keng
สิ่งที่หาไม่ได้ง่าย ๆ คือโอกาสทองของชีวิต
Global Moderator
เทพแห่งบอร์ด
*

Karma: 3
Offline Offline

Posts: 865


sc450617@at_hotmail_dot_com.com
WWW
« Reply #4 on: February 13, 2007, 11:35:32 am »

ลองเปลี่ยนเป็นคำอื่นหรือยังครับที่นอกจาก xxxxxx น่ะครับ อย่างเช่นใส่อีเมลล์ที่ถูกต้องเข้าไปครับ ถ้าเปลี่ยนแล้วส่งได้ ก็หมายความว่าระบบเมลล์มันตรวจสอบชื่ออีเมลล์ด้วยน่ะครับ ซึ่งผมเองก็ไม่แน่ใจตรงส่วนนี้ครับ
Logged

www.cakephp.in.th
www.hotel-reservation.in.th

mambo laithai:www.mambohub.com
mambo dev:www.mambo-foundation.org
ywc#2
KConvert dev (convert character set)
www.keng-d.com
เที่ยวในไทย www.tour-in-thai.com
Keng:Suriya Kaewmungmuang
เก่ง:สุริยา แก้วมุงเมือง
siyanaka
มือใหม่หัดโพส
*

Karma: 0
Offline Offline

Posts: 10


Email
« Reply #5 on: February 13, 2007, 07:50:57 pm »

เปลี่ยนเป็น email ผมแล้วครับ Huh
แต่ยังคงทำไม่ได้   แต่ถ้าเป็น  emailผม@hotmail แค่นี้จะส่งได้ครับ
Logged
Pages: [1]   Go Up
Print
Jump to: