EllisLab text mark
Advanced Search
     
CodeIgniter email library problem in Yahoo
Posted: 12 May 2011 06:39 PM   [ Ignore ]
Joined: 2010-09-01
50 posts

Hello evrybody
i’ve a problem in sending email to yahoo .
i sent an email to yahoo Mail and gmail by email library but my email message didn’t shows in Yahoo mail it meaning Yahoo receives my email and shows email subject but email message body is empty but all everything in gmail in ok :D

it’s my code and configurations

email config

$config['protocol''mail';
$config['mailpath''/usr/sbin/sendmail';
$config['mailtype''html';
$config['charset''utf-8';
$config['wordwrap'FALSE;
$config['priority'1

and my code

$msg'
<center>
<table style="width: 80% ;border: 1px solid #3399FF;">
    <tr>
        <td style="text-align: center;font-family: Tahoma;    font-size: small;    direction: rtl;    background-color: #66CCFF;">%title%</td>
    </tr>
    <tr>
        <td style="text-align: right;font-family: Tahoma;    font-size: small;">%text%</td>
    </tr>
</table>
</center>
        '
;
        
        
$msg str_replace('%text%',$this->UTF_to_Unicode('سلام '),$msg);
        
$msg str_replace('%title%',$this->UTF_to_Unicode('عنوان'),$msg);
        
$this->email->clear();
        
$this->email->from('test@example.com''تست ');
        
$this->email->to('my_email@yahoo.com');        
        
$this->email->subject('سلام');
        
$this->email->message($msg);
        
        
$this->email->send(); 

what is my mistake ?

Best Regards
Ali

 
Posted: 13 May 2011 12:44 AM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Joined: 2009-03-30
1303 posts

Just to rule out the obvious, have you checked you spam filter? And you can try:

$this->email->send();
echo 
$this->email->print_debugger(); 

This may print something useful. Since some servers are wanting more information in the email header for validation.

 
Posted: 13 May 2011 06:50 AM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Joined: 2010-09-01
50 posts
pickupman - 13 May 2011 04:44 AM

Just to rule out the obvious, have you checked you spam filter? And you can try:

$this->email->send();
echo 
$this->email->print_debugger(); 

This may print something useful. Since some servers are wanting more information in the email header for validation.

yes, i’m checked the spam filter and it is not my problem . and the result of print_debugger() is

Your message has been successfully sent using the following protocolmail

User
-AgentTest
Date
Fri13 May 2011 14:16:52 +0430
From
: =?utf-8?Q?=d8=aa=d8=b3=d8=aa_?= 
Return-
Path
Reply-To"info4@test.com" 
X-Senderinfo4@test.com
X
-MailerTest
X
-Priority(Highest)
Message-ID: <4dccfe0ced139@test.com>
Mime-Version1.0
Content
-Typemultipart/alternativeboundary="B_ALT_4dccfe0ced154"

This is a multi-part message in MIME format.
Your email application may not support this format.

--
B_ALT_4dccfe0ced154
Content
-Typetext/plaincharset=utf-8
Content
-Transfer-Encoding8bit

عنوان

سلام 


--B_ALT_4dccfe0ced154
Content
-Typetext/htmlcharset=utf-8
Content
-Transfer-Encodingquoted-printable
=?utf-8?B?2LPZhNin2YU=?=

<
center>
<
table style=3D"width: 80% ;border: 1px solid #3399FF;">
    <
tr>
        <
td style=3D"text-align: center;font-family: Tahoma;    font-size: small;    di=
rection: rtl;    background-color: #66CCFF;"
>&#1607;&#1606;&#1608;&#1575;&#160;=
6;</td>
    </
tr>
    <
tr>
        <
td style=3D"text-align: right;font-family: Tahoma;    font-size: small;">&#=
1587;&#1604;&#1575;&#1605;&#32;</td>
    
</tr>
</
table>
</
center>

--
B_ALT_4dccfe0ced154-- 

There are any problem in the debugger result ?

Thanks

 
Posted: 13 May 2011 10:27 AM   [ Ignore ]   [ # 3 ]   [ Rating: 0 ]
Joined: 2009-03-30
1303 posts

Wonder if your ip address you maybe sending from maybe black(grey)listed. Do you have any other location you could send from? Doing some googling yields some results with yahoo being picky about html only. What happens if you try sending using smtp?

 
Posted: 14 May 2011 11:13 AM   [ Ignore ]   [ # 4 ]   [ Rating: 0 ]
Joined: 2010-09-01
50 posts
pickupman - 13 May 2011 02:27 PM

Wonder if your ip address you maybe sending from maybe black(grey)listed. Do you have any other location you could send from? Doing some googling yields some results with yahoo being picky about html only. What happens if you try sending using smtp?

i sent from 2 ip addresses in Iran & Netherlands but i think ip address is not my problem because Yahoo receives my email and shows subject of my email and ... but only didn’t shows message body .
about smtp ? i didn’t realize you . can you please explian more about ?
i am using “Best SMTP Server” program in localhost to send email via localhost ? do you have any other idea ?


Best Wishes
Ali

 
Posted: 14 May 2011 12:44 PM   [ Ignore ]   [ # 5 ]   [ Rating: 0 ]
Joined: 2009-03-30
1303 posts

Ah, different issue. I was reading “email message not received” that it never shows up in yahoo mail at all. If you are missing the message body, I would guess it to be some encoding issue. Since you are currently trying to send a ‘html’ type, try $config[‘text’].

Out of curiosity, if you are sending via localhost smtp server, why have you used sendmail in your configuration?

 
Posted: 14 May 2011 01:05 PM   [ Ignore ]   [ # 6 ]   [ Rating: 0 ]
Joined: 2010-09-01
50 posts
pickupman - 14 May 2011 04:44 PM

Ah, different issue. I was reading “email message not received” that it never shows up in yahoo mail at all. If you are missing the message body, I would guess it to be some encoding issue. Since you are currently trying to send a ‘html’ type, try $config[‘text’].

Out of curiosity, if you are sending via localhost smtp server, why have you used sendmail in your configuration?

i set up sendmail for using in host , but sendmail didn’t work without smtp server :D
about text messagge , Yahoo have not any problem with text mails , i only want use html email smile

 
Posted: 14 May 2011 01:17 PM   [ Ignore ]   [ # 7 ]   [ Rating: 0 ]
Joined: 2009-03-30
1303 posts

Just double checked your message source. You don’t have a valid html source. Try this:

$msg'
<html>
<head><title>Your title</title></head>
<body>
  <center>
  <table style="width: 80% ;border: 1px solid #3399FF;">
      <tr>
          <td style="text-align: center;font-family: Tahoma;    font-size: small;    direction: rtl;    background-color: #66CCFF;">%title%</td>
      </tr>
      <tr>
          <td style="text-align: right;font-family: Tahoma;    font-size: small;">%text%</td>
      </tr>
  </table>
  </center>
</body>
</html> 
 
Posted: 14 May 2011 01:47 PM   [ Ignore ]   [ # 8 ]   [ Rating: 0 ]
Joined: 2010-09-01
50 posts
pickupman - 14 May 2011 05:17 PM

Just double checked your message source. You don’t have a valid html source. Try this:

$msg'
<html>
<head><title>Your title</title></head>
<body>
  <center>
  <table style="width: 80% ;border: 1px solid #3399FF;">
      <tr>
          <td style="text-align: center;font-family: Tahoma;    font-size: small;    direction: rtl;    background-color: #66CCFF;">%title%</td>
      </tr>
      <tr>
          <td style="text-align: right;font-family: Tahoma;    font-size: small;">%text%</td>
      </tr>
  </table>
  </center>
</body>
</html> 

now yahoo don’t receives even my email !! smile  i don’t know what is my problem , but i think it’s for sending from localhost and another problem was in my html code that was not valid html ( Thanks for sending valid html of message body ) . i think your html code working fine now in yahoo . out of this discussion , how can i send email from localhost without other programs like “Best SMTP Server” which i am using ? i am using xampp .

Thanks a lot for your answers wink

 
Posted: 14 May 2011 01:55 PM   [ Ignore ]   [ # 9 ]   [ Rating: 0 ]
Joined: 2009-03-30
1303 posts

Glad you are on the right track. Several ISPs allow you to send if you have an email address setup. You would use the same settings for an email client (email address, password, mail server).

Example:

$config['smtp_host''mail.myisp.com';
$config['smtp_user''me@myisp.com';
$config['smtp_pass''password';
$config['smpt_port''25';
$config['protocol']  'smtp'

If you don’t have an email address setup with your ISP, and use gmail, you can send via smtp with your gmail account.

$config['protocol']  'smtp';
$config['smtp_host''ssl://smtp.googlemail.com';
$config['smtp_port''465';
$config['smtp_timeout''30';
$config['smtp_user''me@gmail.com';
$config['smtp_pass''password';
$config['charset']  'utf-8';
$config['newline']  "\r\n"

I use both locally on Windows using Wamp.

 
Posted: 14 May 2011 02:20 PM   [ Ignore ]   [ # 10 ]   [ Rating: 0 ]
Joined: 2010-09-01
50 posts
pickupman - 14 May 2011 05:55 PM

Glad you are on the right track. Several ISPs allow you to send if you have an email address setup. You would use the same settings for an email client (email address, password, mail server).

Example:

$config['smtp_host''mail.myisp.com';
$config['smtp_user''me@myisp.com';
$config['smtp_pass''password';
$config['smpt_port''25';
$config['protocol']  'smtp'

If you don’t have an email address setup with your ISP, and use gmail, you can send via smtp with your gmail account.

$config['protocol']  'smtp';
$config['smtp_host''ssl://smtp.googlemail.com';
$config['smtp_port''465';
$config['smtp_timeout''30';
$config['smtp_user''me@gmail.com';
$config['smtp_pass''password';
$config['charset']  'utf-8';
$config['newline']  "\r\n"

I use both locally on Windows using Wamp.

WoW , Thanksss a looooottt :-x
i used gmail smtp and it working very fast and good , now yahoo can receives HTML mails whithout any problem
thanks so much for your helps , it was a great help to me , Thanks again

 
Posted: 14 May 2011 02:47 PM   [ Ignore ]   [ # 11 ]   [ Rating: 0 ]
Joined: 2009-03-30
1303 posts

Great. I guessed that could been a lot easier to begin with.