Completed orders on Woocommerce don't send e-mail message to customer - email

I do not get any e-mails after the order is completed. I have read through many support threads and tried to fix it by myself but it does not work. I have even tested with this plugin: https://wordpress.org/plugins/wp-smtp/ – I get messages with or without a specified server.
I don’t know if it makes any difference but I copied the template file for this email message and changed the message to:
<p><?php printf( __( 'Hej! Din beställning på %s har blivit slutbehandlat.</br></br> Tusen tack och tusen grattis till att du köpt utbildningen Tänk dig fri! Detta är en av de viktigaste investeringarna i dig själv som du kan göra. Jag hoppas att utbildningen kommer ge dig allt det du längtar efter!<br/><br/>Här är en länk till ett videoklipp jag vill att du kollar på innan du börjar studera kapitel 1.<br/><br/>Ljudfilerna till boken finner du här.<br/><br/>Tänk dig fri boken skickas vanligen till dig inom 2-5 arbetsdagar. Dina beställningsdetaljer finns längst ner i detta meddelande.<br/><br/>Många varma lyckönskningar,<br/>Susanna<br/><br/>', 'woocommerce' ), get_option( 'blogname' ) ); ?></p>
This template is on my child-theme folder inside of woocommerce/emails. For what matters I – as a customer – have never received any message and yes, I have checked my spam box.

I got it! The issue was being caused by the fact that the woocommerce e-mail sender had an email address that did not match with the domain. I changed the e-mail address and now everything works perfectly.
Hope this might help anyone else!

Related

Shopware 6 PayPal Invoice Purchase does not include order_transaction custom_fields swag_paypal_pui_payment_instruction on some orders

We sporadically observe missing data in PayPal purchase on invoice purchase orders. We have a middleware that listen to "state_enter.order_transaction.state.paid" webhook and then forwards the order to an ERP system.
Until now we have received all necessary data in the order_transaction => custom_fields. For invoice purchase the swag_paypal_pui_payment_instruction data are important for us.
{
"swag_paypal_order_id": "....",
"swag_paypal_partner_attribution_id": "shopwareAG_Cart_Shopware6_PPCP",
"swag_paypal_pui_payment_instruction": {
"name": {... },
"email": "...",
"birth_date": "...",
"phone": {...},
"billing_address": {...},
"payment_reference": "...",
"deposit_bank_details": {...},
"experience_context": {....},
"swag_paypal_resource_id": "..."
}
However, for some orders we do not receive any data in the field: swag_paypal_pui_payment_instruction.
{
"swag_paypal_order_id": "....",
"swag_paypal_partner_attribution_id": "shopwareAG_Cart_Shopware6_PPCP"
}
But it is not a problem with the webhook or the request, because the data is already not available in the database for this orders.
I find the following error messages in the logs at this date, but for a different transaction, which then has the necessary data at the end. But I cannot find any log entries for the transaction that has no data.
[2022-11-27T20:30:10.896943+00:00] request.ERROR: Uncaught PHP Exception Swag\PayPal\Checkout\PUI\Exception\PaymentInstructionsNotReadyException: "Payment instructions for transaction "b87…….b0c1" not yet available" at /var/www/clients/client1/web3/web/prod/custom/plugins/SwagPayPal/src/Checkout/PUI/SalesChannel/PUIPaymentInstructionsRoute.php line 129 {"exception":"[object] (Swag\\PayPal\\Checkout\\PUI\\Exception\\PaymentInstructionsNotReadyException(code: 0): Payment instructions for transaction \" b87…….b0c1\" not yet available at /var/www/clients/client1/web3/web/prod/custom/plugins/SwagPayPal/src/Checkout/PUI/SalesChannel/PUIPaymentInstructionsRoute.php:129)"} []
Has anyone observed anything similar?
Shopware Version: 6.4.14.0
Paypal Plugin: 5.4.1
Here is shopwares support answer, it may help someone.
„The behaviour occurs when the customer does not wait for the confirmation from PayPal after the redirection from PayPal back to the shop.“
Ich hab den Sachverhalt nochmal genau geprüft und nach Rücksprache mit
der Entwicklung identifizieren können, dass das Verhalten auftritt,
wenn der Kunde nach der Umleitung von PayPal zum Shop zurück die
Bestätigung von PayPal nicht abwartet. Dieses Verhalten ist
entsprechend nicht direkt auf Shopware-Seite beeinflussbar. Die Kunden
erhalten von RatePay / PayPal eine E-Mail mit der
Zahlungsaufforderung. In solchen Fällen schreibt Shopware ein
entsprechenden Hinweis auf die Rechnung anstelle der Kontodetails.
Unfortunately, the reference mentioned does not exist. The last statement is that Shopware will look into it.
ich habe mich noch mal Rücksprache mit der Entwicklung gehalten. Die
Meldung auf der Rechnung erscheint nur, wenn der Zahlvorgang auch
funktioniert hat. Wir schauen uns für zukünftige Updates an, ob sich
das noch anders lösen lässt. In jedem Fall, also egal ob der Kunde die
Bestätigung von PayPal abwartet oder nicht abwartet wird eine Mail von
Ratepay mit den Zahlungsinformationen versendet.
I hope that it will be possible to solve this better in the future so that the necessary data can be transferred cleanly to other systems.
I'm not super familiar with the PayPal plugin but just from looking at the code I found two instances where the custom field is written.
PlusPuiHandler, PayPalPuiPaymentHandler
In both cases the custom field is explicitly not written if the instruction type is not invoice or if the payment instructions are null. Since you mentioned this specifically regards invoice payments, there's only one place I could find where instructions are set.
PUIPaymentInstructionDataService
There's potentially a PaymentInstructionsNotReadyException being thrown here. So it looks like you were on the right track. The exception is also deliberately being caught with the intention of "polling it later", even though I'm not quite sure what that means. Maybe you could try and repeat the call used for the argument of setPaymentInstructions and get the instructions at a later point?

Emails generated by Googleappscript are skipping my inbox

I have a shared google sheet that when someone enters their info it prompts the next individual with an email that's automatically generated by the script. These emails prompt a dozen individuals and show up as coming from my email. This has functioned perfectly for months.
In the past week or so I've stopped emails have stopped coming to my inbox. The still shows up in "Sent" and also under "All Mail" but I'm not sure if that's just the "sent" message". All other users receive emails normally. Also, if I change my target address to a different email it works fine. Basically, it appears i can't send myself an email.
I have recently started using email filters which I know is the most likely culprit in these situations. None of them currently use the "Skip Inbox" function.
I have no idea why these emails don't show up for me despite working for everyone else as well as if I enter an alternate email address.
Edit #1:
Below is the section of code that emails the next person. As stated it appears to be working perfectly because everyone else except myself gets an email. Also if I change my email to an alternate email that works as well. It appears the issue is solely when the script emails myself from the same email address.
Also, I noted that I was previously receiving emails. This may have been untrue. As a testing measure I previously "CC'd" myself with every email that went out so that I could track that the system was working well. You'll note in the code that my email address is stored in the variable "emailAddress2" and that the CC line has now been commented out. I may not have been receiving the actual email sent to myself before but actually only receiving the CC'd version.
Here's the code:
function emailNext (JustPickedName, NextToPickName, SelectedDate) {
// Function Sends emails to the next Person in the list
Logger.log("Into Email Next");
//Set all the Email characteristics
SelectedDate = Utilities.formatDate(new Date(SelectedDate), "GMT", "EEE, MMM d, yyyy"); //Format the Date for inclusion in the email
var StaffMember = StaffList.find(StaffList => StaffList.Name === NextToPickName);//Find Emails address by finding name in Emails Object
var subject = ' You have a pick pending in the ' + ActiveWeekSheetName + ' sheet';
var message =
'<p>Dear Dr. ' + NextToPickName + '</p>' +
'<p>You have a pick pending on ' + SelectedDate + '. Please look at the ' + ActiveWeekSheetName + ' sheet.</p> <p> Dr. ' + JustPickedName + ' has just made a pick and you are up.</p>' +
'<p>You can make your selection here: GGH Room Selection</p>';
MailApp.sendEmail({
to: StaffMember.Email,
//bcc: emailAddress2,
name: 'PickListBot',
subject: subject,
htmlBody: message})
Logger.log("StaffMember.Email: " + StaffMember.Email);
}
What you are describing might in fact be a bug.
Since this is the case, I suggest you check this issue here on Google's Issue Tracker and star it in order to get any updates with regards to it.

How to send form data to an API - Windev 24

I'm trying to build a simple application on Windev24 and I can't find the right code to send data with a post method to an API I built with Lumen framework. If I test the API via Postman, everything works fine. Here a screenshot of Postman window:
I tried this code:
//MaReq est un restRequête
LaRéponse est un restRéponse
MaReq.URL="https://mywonderfulapi.ch/record"
//I need to find the way to join parameters here...
MaReq.Méthode=httpPost
LaRéponse=RESTEnvoie(MaReq)
SI ErreurDétectée ALORS
Erreur(HErreurInfo(hErrComplet))
SINON
info(LaRéponse.Contenu)
Info(UTF8VersChaîne(LaRéponse.Contenu))
rep = JSONVersVariant(LaRéponse.Contenu)
info(rep)
FIN
I can correctly connect to the API (I get the error message I created in case falses parameters were added to the request), but as I can't find the right way to join the needed parameters, I'm at a stop.
I tried to read the documentation and I tried to figure it out by myself but I couldn't find the way to do that.
Could anyone here help me, please?
Thank you in advance
It's Pretty simple you have to specifiy the type of content you want to send to the server by using MaReq.ContentType = {YourContentType}, then the content by using MaReq.content = {YourContent}, so your code should look like this :
//MaReq est un restRequête
LaRéponse est un restRéponse
MaReq.URL="https://mywonderfulapi.ch/record"
MaReq.ContentType = //yourContentType
MaReq.Content = // YourContent
MaReq.Méthode=httpPost
LaRéponse=RESTEnvoie(MaReq)
SI ErreurDétectée ALORS
Erreur(HErreurInfo(hErrComplet))
SINON
info(LaRéponse.Contenu)
Info(UTF8VersChaîne(LaRéponse.Contenu))
rep = JSONVersVariant(LaRéponse.Contenu)
info(rep)
FIN

account linking: The agent returned an empty TTS

I define the account linking properties for french.
It works correctly using french (canada): the response after invoking my app is: " Il semble que votre compte The Keys ne soit pas encore associé. "
But when using french (france), The response in the simulator is: " The agent returned an empty TTS. "
What is the reason of that ?
In my case it wasn't related to the account linking feature.
My server was simply unavailable (ERR_CONNECTION_TIMED_OUT).

Ubercart - Attempt to e-mail invoice for order 14 to failed

Ubercart is failing to send invoice when it receives a payment from IPN. The error I get is:
'Attempt to e-mail invoice for order 14 to failed'
The only thing I can think of is that it's not running as admin so doesn't have privileges to send the message.
Any pointers are greatly appreciated!
As you can see in ubercart/uc_order/uc_order.ca.inc
foreach ($recipients as $email) {
$sent = drupal_mail('uc_order', 'action-mail', $email, uc_store_mail_recipient_language($email), $settings, empty($settings['from']) ? uc_store_email_from() : $settings['from']);
if (!$sent['result']) {
watchdog('ca', 'Attempt to e-mail invoice for order #order_id to #email failed.', array('#email' => $email, '#order_id' => $order->order_id), WATCHDOG_ERROR);
}
}
Ubercart only use default drupal_mail to sent mail.
Are you sure your server is able to sent mails ?
To be sure this is working, you could try to use the function "Retrieve lost password" that also send emails.
Check the Watchdog log (Admin > Reports > Recent log entries) to see if there is any more detail. The Drupal handbooks have a page on troubleshooting email.
I've just solve the problem!
For 99% you didn't setup your store emial adress under..
[your site] > ADMINISTER > STORE ADMINISTRATION > CONFIGURATION >
CONTACT SETTINGS > Store settings
or link
admin/store/settings/store/edit/contact
Check this comment http://www.ubercart.org/forum/support/10816/unable_send_email#comment-39056