0

I want sent email with Html tags, I install mailsystem and htmlmail modules, according to some tutorial that I read I provide tpl .

anyway The main problem is when I select HTMLMailSysytem in Site-wide default MailSystemInterface class no email sending, but when I put it in DefaultMailSystem mail sent, I try to find out why this happened in my custom module I try

$result = drupal_mail('cdigitdev', 'message_key', $to, user_preferred_language($user), array('body' => $body, 'subject' => $subject, 'headers' => array('Cc' => $header_cc, 'Bcc' => $header_bcc,'Content-Type' => 'text/html; charset=UTF-8; format=flowed'), $from, TRUE));
  ym($result);

The result is

enter image description here But I didn't receive any email !!!!

I think this is related to mail server that when I try to send html server drupal(php) tell it is sended but I did not receive any thing , is it right?

1

For reasons I won't get in to, you should use an SMTP module and route your emails through a real email account. Check the SMTP Authentication Support module. Details from project page:

This module allows Drupal to bypass the PHP mail() function and send email directly to an SMTP server. The module supports SMTP authentication and can even connect to servers using SSL if supported by PHP.

Otherwise your emails can (and will) get blocked as spam.

  • Actually it might be useful to get into some reasons. Most common is graylisting as far as my experience goes. – Mołot Apr 17 '14 at 13:47
  • They did not send, I check spam folder even – Yusef Apr 17 '14 at 13:58
  • @zhilevan upload a PHP file that you make yourself. Use only the mail() function from PHP. See if you get an email that way. – jdu Apr 17 '14 at 14:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.