Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I've been trying to figure this out on my own, but I'm having a hard time. I'm trying to see is there anything additional necessary in my php to send a FULL-HTML enabled email.
I do have the setting inside text-format set to Full HTML.
Here is my script:
$message = message_create('order_confirmation_message', array ( 'uid' => $commerce_order->uid) );
$wrapper = entity_metadata_wrapper('message', $message);
$wrapper->field_order_id_ref->set($commerce_order);
$wrapper->field_e_mail_subject->set("Make your appointment at Luhu");
message_notify_send_message ( $message );
Comment | File | Size | Author |
---|---|---|---|
#2 | 2050473-notification-html-version.patch | 487 bytes | philipz |
Comments
Comment #1
bsandor CreditAttribution: bsandor commentedSetting up drupal to send html mails for message_notify module is a proper solution.
Follow this instruction here: https://www.drupal.org/node/900794
Comment #2
philipz CreditAttribution: philipz commentedI don't know if this could be a setting in rule configuration or what but here's my patch for this.
Comment #3
Aniessh Sethh CreditAttribution: Aniessh Sethh commented@philipz works as expected, thanks ....
Comment #4
B31 CreditAttribution: B31 commented+1 for #2
Comment #5
sadashiv CreditAttribution: sadashiv commentedHi,
#2 works for me as well. May be we can improve the patch to take the header value based on the configuration for the message type. I think we can use load the message type and get the text format from it but still the fix works.
Thanks,
Sadashiv.
Comment #6
ncameron CreditAttribution: ncameron commentedYou can also do this using hook_mail_alter():
Comment #7
bluegeek9 CreditAttribution: bluegeek9 as a volunteer commented