1

I've created a CMS page with a form where customers can submit some info & by clicking 'submit' Magento sends an email (with all the info provided into the form) to an address that I set by a custom configuration tab (Stores > Configuration > Vendor > Module).

I developed it via TransportBuilder: I set up all those files such as email_templates.xml, I created the email template and I've already extended the Magento TransportBuilder class in order to attach a ZIP file to the email (I created the addAttachment() method).

Here's the function in my controller (the $templateVars param is an array that I pass correctly, already checked):

But what is the problem?

When I test this from localhost (working on a local MAMP server), I submit the form and suddenly I correctly receive the email with the right attachments etc. Perfect.

But when I test this on a live server the mail isn't delivered! Even logging with the module's own logger and checking the Magento Sent Emails' Log, they both say that the email was successfully sent but it doesn't arrive into my inbox! I tried to find a solution for days and days but I didn't manage to. Someone's got a solution?

2
  • 1
    Does your production server allow you to send emails using any from/sender address? Jul 25, 2022 at 15:14
  • I actually don't know.. how can I check it?
    – mirkog
    Jul 26, 2022 at 6:32

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.