1

On the rule of sending email order notification I just changed the "FROM:" of the send mail, instead of the email of the website I want the email of the anonymous customer from a custom field of billing information I created then this will be sent to the admin.

This is my current rule:

{ "commerce_checkout_send_an_order_notification_e_mail_admin" : {
"LABEL" : "Send an order notification e-mail ADMIN",
"PLUGIN" : "reaction rule",
"WEIGHT" : "4",
"OWNER" : "rules",
"TAGS" : [ "Commerce Checkout" ],
"REQUIRES" : [ "rules", "commerce_checkout" ],
"ON" : { "commerce_checkout_complete" : [] },
"IF" : [
{ "entity_has_field" : { "entity" : [ "commerce-order" ], "field" : "commerce_customer_billing" } },
{ "entity_has_field" : { "entity" : [ "commerce-order" ], "field" : "commerce_line_items" } },
{ "entity_has_field" : {
"entity" : [ "commerce-order:commerce-customer-billing" ],
"field" : "field_email"
}
}
],
"DO" : [
{ "entity_fetch" : {
"USING" : {
"type" : "commerce_customer_profile",
"id" : [ "commerce-order:commerce-customer-billing:profile-id" ]
},
"PROVIDE" : { "entity_fetched" : { "customer_profile" : "customer_profile" } }
}
},
{ "mail" : {
"to" : "[site:mail]",
"subject" : "[customer-profile:field-full-name] - Event: [customer-profile:field-event-name]",
"message" : "Customer Name: [customer-profile:field-full-name]\r\nCustomer Email: [customer-profile:field-email]\r\nCustomer Contact Number: [customer-profile:field-contact-number]\r\nEvent Date: [customer-profile:field-event-date-no-end-date:event_date]\r\n\r\nPackages Selected:\r\n[commerce-order:commerce_line_items]\r\n\r\nOverall Total: [commerce-order:commerce_order_total]",
"from" : "[customer-profile:field-email]",
"language" : [ "commerce-order:state" ]
}
}
]
}
}

When I checked the log report of the website it says "Successfully sent email" but I never received the email. but whenever I change the "FROM:" to blank or [site:mail] I will receive the email notification. Why is that? The token I used for the "FROM:" is exactly the same as on the message and it's correct.

  • This may be due to server blocking. Please try adding the customer email address same as site email and than run this rule. See what happen, if problem persist, please let me know. – Shubham Feb 9 '16 at 5:27
  • It works, on my email it says the customer email address via the website. When I tried to reply it will be sent to the custom email and the site mail. How can I just use the customer email on the rule without the site email? Which settings should I adjust? Thank you! – Danz Feb 9 '16 at 6:54
0

Your issue is due to server email blocking. Please configure SMTP module for sending emails from the website. This will add appropriate headers in the mail, and your email will not get blocked.

Hope this will help you.

Thanks

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.