I've set up a Woocommerce webshop and would like to change the recipient for the order invoice.
The website uses WooCommerce V3.6.5 with the Flatsome Theme.
I tried to change the admin email address in Wordpress settings but that didn't work. I still receive the invoice at the old email address.
I tried to look into the function.php but that only shows the following:
* #package flatsome
*/
require get_template_directory() . '/inc/init.php';
Does anyone know how to change the order invoice recipient? In the WooCommerce -> Settings -> Email tab I can only change the email formats and "From" email address.
I would go for this solution using $recipient variable, please have a try.
function change_email_recipient( $recipient ) {
global $woocommerce;
$recipient = 'email#email.com';
return $recipient;
}
add_filter( 'woocommerce_email_recipient_new_order', 'change_email_recipient', 10, 2 );
Related
I send 200 emails to a community of students via a google-spreadsheet attached google script.
My mailing call is as follow :
MailApp.sendEmail(
"toto#gmail.com", // targetEmail
"HELLO FROM KING OF NIGERIA", // emailTitle
"", // something
// emailContentHTML
{ htmlBody: "<b>Hello John</b><br><p>I'am king of Nigeria.<br>Got gold everywhere.<br>Need your help I'am in danger.<br>Want to share with you.<br>Could you send me 50$<br>Sinceraly, your friend.</p>"}
);
The script being run by my google account john.Doe#entreprise.com, the 200+ participants see the email as coming from me (john.Doe#entreprise.com). I understand this is fair game to limit spamming and co, but my company has a gmail entreprise.com domain name and I would like a solution so to not get dozens of "Thanks you" alerts in the following days. For sure, I do NOT want them to keep me in their following discussion.
So I look for something such as create a no-reply#entreprise.com account, and then a js thing so the script sign email with this no-reply#entreprise.com email.
Also, is there a way to programatically sign the google-script mailing from an other account of my company (no-reply#entreprise.com) ?
Note : google-script-manual
Since the script is being run under your Gmail account, the easiest way to do this is to add noReply: true to the message object. This will result in the email being sent from a generic noreply#enterprise.com email. The noreply email account does not need to be created for this to work.
Note that this does not work for personal Gmail accounts.
The documentation for this is at this link as noted in Edward Wall's answer.
MailApp.sendEmail(
"toto#gmail.com", // targetEmail
"HELLO FROM KING OF NIGERIA", // emailTitle
"", // something
// emailContentHTML
{ htmlBody: "<b>Hello John</b><br><p>I'am king of Nigeria.<br>Got gold everywhere.<br>Need your help I'am in danger.<br>Want to share with you.<br>Could you send me 50$<br>Sinceraly, your friend.</p>",
//send from generic noReply#enterprise.com address
noReply: true}
);
You could use the following method from the MailApp documentation
sendEmail (title, replyTo, subject, body)
Setting the replyTo to your do-not-reply email will mean that anyone who presses reply will send their email to your do-not-reply mailbox
MailApp.sendEmail (
"email#example.com", // targetEmail
"do-not-reply#example.com", // reply to email
...
)
Link to MailApp Documentation
The easiest way to send email from the no-reply#enterprise.com account is having the Apps Script will have to run under the authority of that account.
How you achieve this depends on how the script is being executed. If it is being executed by a Trigger, the Trigger must be created by the no-reply account.
If the script is published as a web-app, it should be deployed from the no-reply account, and set to execute as no-reply#enterprise.com.
If the script is triggered manually, it will have to be triggered by somebody logged in as the no-reply user.
A simpler option is to set a reply-to address, as shown in Edward Wall's answer.
I want to create an 'Email to friend' form where the user enters an email address, and an email is sent to that address with a link to the current page url.
How do I set the receiver to be the email entered into the form?
plugin.tx_powermail.settings.setup.receiver.overwrite.email = TEXT
plugin.tx_powermail.settings.setup.receiver.overwrite.email.data = myemailfield??
.data = GP:tx_powermail_pi1|field|markername
But beware that your system can send emails to any email address that a user wants. Someone could use it for spaming with a "tipafriend" function.
I have a question about the PHP-Paypal-API. When paying I set the following parameters to each item:
$itemDetails = new PaymentDetailsItemType();
$itemDetails->Name = $item['name'];
$itemDetails->Amount = $itemAmount;
$itemDetails->Quantity = $item['count'];
$itemDetails->ItemCategory = isset($item['pp_cat']) ? $item['pp_cat'] : 'Digital';
$itemDetails->Tax = new BasicAmountType($data['currencyCode'], $item['tax']);
$paymentDetails->PaymentDetailsItem[] = $itemDetails;
In the shopping cart in Paypal, the names of the items are assigned correctly. The Payment works as expected. (This is only a Screenshot from a Test-Product in Sandbox, but same Code.
But in the E-Mail, the seller gets as soon as the payment was successfully, the description is empty. I unfortunately only have the German Mail, but maybe it will help you anyway.
What Parameter should be set, so the Description in the E-Mail isn't empty?
I have also found a similar thread but there was no answer. No description or item name on PayPal Payment Received email
Kindly create an MTS ticket at our Technical Portal (https://www.paypal-techsupport.com/) and share the affected transaction ID further checking.
Laravel5 Currently i am facing issue unable to check the status email is sent and not even getting email failed and i am using mandrill api for sending emails
$mail = Mail::send('emails.pendingorder', $data , function($message) use ($domain, $order)
{
if ($order->other_email) {
$message->from($domain->email, $domain->website);
$message->to($order->email, $order->name)->subject('test Email ');
$message->bcc($order->other_email, $order->name)->subject('test Email ');
}else{
$message->from($domain->email, $domain->website);
$message->to($order->email, $order->name)->subject('test Email ');
}
});
if($mail){
echo 'sent';
}else{
echo 'Fail';
}
The second thing..
i created email templates in blade and i want to preview email in ckeditor if there any any chaning or modification require then i edit the content and send email. i havn't any idea how to to this :(
Its my first try with laravel email and i am totally stuck with it
Do you have correct configuration in config/mail.php? Remember to change pretend to false. Also, Mail::send returns void, so you will have to check status on your mandrill account.
For editing email before sending it:
create form with ckeditor
fill this form with your default template
after submitting you have email body in your request, you can pass it to your email view
If you want your email to be fully editable, instead of having email view with only one variable you can use:
Mail::raw('This will be body of your email', function($message) {
// ...
});
I have Magento 1.6.0.0 and I use Paypal Express Checkout. The issue is that Invoice emails are not automatically sent. It says at the invoice details page:
the invoice email is not sent
Can someone tell me whats the issue here?
The Order confirmation emails are sent successfully and I think Paypal data is also getting captured via IPN (or by PDT) as I am getting "Payment Information" filled with data coming from paypal.
Let me know how to get this solved.
Thanks a lot.
Ok this is how I have solved it myself !!
[file \app\code\core\Mage\Sales\Model\Order\Payment.php]
public function registerCaptureNotification($amount)
{
.
.
.
// at the end right before return $this;
// Custom Code - Send email on Invoice #-
if (!$this->getIsTransactionPending()){
if(!$this->getIsFraudDetected()){
if($invoice)
{
#$invoice->sendEmail();
#$invoice->setEmailSent(true);
}
}
}
//#-
}
However, this will only work with Paypal IPN being called and confirmed...