xpertbot / craft-wheelform

Craft CMS 4 Form with Database integration
MIT License
66 stars 32 forks source link

SMPT (sendgrid) mailer notification not sending #279

Closed wallythewebdev closed 2 years ago

wallythewebdev commented 2 years ago

Hi there,

I recently had to start using a SMPT service (sendgrid) as some emails were not being received by the "To emails" address in wheel form. Using the STMP service has resolved this issue, but now there are no "User notfication" emails being sent.

REF: To Email image

REF: User Notification email image

I am routing notifications via the wheelform.php file so I can use a template to format the User notifcation email (amazing feature btw).

wheelform.php

<?php return [
  'forms' => [
      2 => [
          'notification' => [
              'template' => '_emails/download',
              'subject' => 'one pager download',
          ],
      ],
  ]
];

This was all working i.e. users were receiving notifications while using the Transfer type = send mail in Crafts settings.

Now that I have swapped over the SendGrid I get the "To email" - letting me know that a submission has taken place but the User notification generates and ERROR and a Warning in the logs that I am trying to debug:

2022-10-24 11: 53: 01 [web.ERROR
] [yii\symfonymailer\Mailer: :sendMessage
] Unable to send an email: The content value must be a string at least one character in length. (code 400). {
  "memory": 7286536
}

The other error log contained a fair amount of sensitive data that I have culled, but please let me know if that is going to be required as well.

Seeing that this had worked previously im not sure what might have caused this issue.

Any help would be greatly appreciated

wallythewebdev commented 2 years ago

Turnout this was due to the Sendgrid plugin - I stopped using it and added all the cradentials manually and it works now