How to add Payment method title in order email - email

I have added one Transactional Email for new order in admin. And i want to insert new variable for magento payment method in the bottom of my order email. But i'm not getting how i can achieve this. Can someone help me to solve this?
There is already code for Payment method block {{var payment_html}}
But i want to add only title of Payment method in footer of order email.

{{var order.getPayment().getMethodInstance().getTitle()}} should print out the title.

You should change the template;
which you can do here:
System > Templates > Transactional Emails
For more information you can look this up:
http://www.magentocommerce.com/knowledge-base/entry/customizing-transactional-emails

Related

SendGrid Transactional Templates - Address and Unsubscribe Link Broken

I've configured several Transactional Templates to be sent from my SendGrid account via their handy Design Tool, which work great!.
However the Address Line and Unsubscribe links on the template footer aren't activated. In an email they display as placeholders, like so
[Sender_Name]
[Sender_Address], [Sender_City], [Sender_State]
[Sender_Zip]
Unsubscribe << (Not a Hyperlink)
I've followed SendGrid's documentation and configured my account address but am unable to find the solution for this.
Any ideas on this? Thanks for any input or guidance!
To get the unsubscribe to function you will need to create one or more unsubscribe groups. If you look under the Marketing menu you will see the sub menu to create those. Once you create one it will be assigned an ID number. When you are generating your email you will need to pass that ID value in as part of the EmailMessage object. If you are using V3 of the API you will be looking for SetAsm.
As for the Sender fields, for transactional templates they do not work correctly, as they are meant for marketing campaigns. Your two options are:
Remove the Sender fields from that block in the template. Add a new text block above it with static values.
Download the template into HTML and convert the sender objects into substitution variables. You will then be able to set them in your code when you are creating the email.
GitHub Bug
The unsubscribe link will only appear if you create an unsubscribe group and specify it while sending using
asm: {
group_id: <the unsubscribe group ID>
}

Order confirm email translation issue Magento 2

Our Magento 2.1.5 site is ready to translate all email templates.
But, when a customer creates order, he got non-translated order confirm email immediately. To check this issue, when we click "send email" tab on order view page on admin, we get the correctly translated email.
Send order
What was wrong?
We found this email template which was just order_new.html on theme folder.
app\design\frontend\[vendor]\[theme]\Magento_Sales\email\order_new.html
Also, this template was assigned on vendor.
vendor\magento\module-sales\etc\email_templates.xml
<template id="sales_email_order_template" label="New Order" file="order_new.html" type="html" module="Magento_Sales" area="frontend"/>
Is there any solution?
I solved this issue successfully.
This is solution.
Original:
#subject Your {{var store.getFrontendName()}} order confirmation #
My Solution:
#subject {{trans "Your %store_name order confirmation" store_name=$store.getFrontendName() }}#

I use magento 2, when submit contact form then issue on mail

I use magento 2, when submit contact form then issue on mail, when receive successfully but problem is apostrophe character.
Suppose any Customer write comment like: Can't able to login then in mail
display like: Can &#039 ; t able to login
I use 4-5 latest version all version this common issue,
Please help to resolve if you know
Go to this path "/vendor/magento/module-contact/view/adminhtml/email" and open "submitted_form.html" and replace 19th line code with the below-mentioned code
{{trans "Comment: %comment" comment=$data.comment|raw}}
Adding to the comment of Abhinav Kumar Singh, there's another way for those who are working with copies of the default e-mail templates in admin backend: MARKETING > COMMUNICATIONS > E-MAIL TEMPLATES.
No need to override original Magento files.
After you have imported the Contact-Form Template, you will find the same syntax in the Template Content field. Just add the "|raw" tag there.
{{trans "Comment: %comment" comment=$data.comment|raw}}
or
{{var data.comment|raw}}

Send a copy to yourself with Contact Form 7 in WordPress

I need to add a checkbox with text "Send a copy of this email to yourself" to Contact Form 7 in WordPress, so the sender can receive a copy of the message he sents.
I can't find anything on google, so your help would be really appreciated.
Thank you.
In the solutions above you can have two recipients, but you asked about a mail copy, so a carbon copy perhaps. The best practice is to use the "additional headers" functionality of the "contact form 7" wp plugin.
Good luck! :)
P.S.: But with checkbox it is more complicated, you need to use JS validation in "Form" box.
I am not using Contact Form 7 anymore but as far as I remember on the settings page of your form, there are two areas called Mail. The first one is for receipment and you can enable the other one by checking the checkbox Mail(2). That one is for copies.
http://s.wordpress.org/extend/plugins/contact-form-7/screenshot-1.png?r=561651
By the way, I recommend using: http://www.gravityforms.com/
Very easy to use and lots of options to play with.
add this code to your theme's functions.php
add_filter( 'wpcf7_additional_mail', 'my_wpcf7_use_mail_2_or_not', 10, 2 );
function my_wpcf7_use_mail_2_or_not( $additional_mail, $cf ) {
if ( 'yes' != $cf->posted_data['sendcopy'] )
$additional_mail = array();
return $additional_mail;
}
and alter the select tag to this:
[select sendcopy "no" "yes"]
Copy email form the one with mail tags that you receive and place it to the mail(2) field. and
ticke the Mail(2). then your Mail(2) will be active only when they select "yes".
In the mailing address input field you can just add additional email addresses separated by a comma.
+1 for Gravity Forms too. It's developer licence is well worth the money a brilliant plugin.

Force.com email service

I have created an email service in force.com.Can anyone help me out of how to use thta in apex classes.say,i wanna send mail when user registration is successful??
Many Thanks,
Sandhya Krishnan
I assume you want to send an email directly from Apex code, either in a Trigger or from a page controller ... ? If so, this page can get you started:
http://www.forcetree.com/2009/07/sending-email-from-your-apex-class.html
Clearly you don't want to hard-code your email template into your classes, so make sure to read at least through the part that shows how to look up the template dynamically. That should be enough to get you on your way.