Mail not sending, throwing error

Sending mail stopped sending.
I have several forms on one site and none of them will send anymore.
Problem #1 was that mailbody would empty on save. Just added text “This is content” in the mail body which will stick.
Problem #2 is that the form will not send but will throw an error. And I don’t know what is wrong.
{"code":0,"file":"\/var\/www\/domains\/ov-makkum.nl\/www\/dmxConnectLib\/PHPMailer\/PHPMailer\/PHPMailer.php","line":1256,"message":"Invalid address: (From): ","trace":"#0 \/var\/www\/domains\/ov-makkum.nl\/www\/dmxConnectLib\/modules\/mail.php(81): PHPMailer\\PHPMailer\\PHPMailer->setFrom('', '')\n#1 \/var\/www\/domains\/ov-makkum.nl\/www\/dmxConnectLib\/lib\/App.php(193): modules\\mail->send(Object(stdClass), '')\n#2 \/var\/www\/domains\/ov-makkum.nl\/www\/dmxConnectLib\/lib\/App.php(157): lib\\App->execSteps(Object(stdClass))\n#3 \/var\/www\/domains\/ov-makkum.nl\/www\/dmxConnectLib\/lib\/App.php(127): lib\\App->execSteps(Array)\n#4 \/var\/www\/domains\/ov-makkum.nl\/www\/dmxConnectLib\/lib\/App.php(116): lib\\App->exec(Object(stdClass), false)\n#5 \/var\/www\/domains\/ov-makkum.nl\/www\/dmxConnectLib\/lib\/App.php(94): lib\\App->exec(Object(stdClass))\n#6 \/var\/www\/domains\/ov-makkum.nl\/www\/dmxConnect\/api\/pages\/lidworden\/lidinsert.php(8): lib\\App->define(Object(stdClass))\n#7 {main}"}
Please advice.

Hello, the error says the address used in From option is invalid:

Invalid address: (From)

I noticed that, but fact is that the address is a valid mailaddress:


are you sure this input gets passed to the server action?

For as far as I can be sure of anything:

please disable the send mail step and add a setvalue step, use the $_POST.email there, enable output and submit the form. Do you see anything returned by the setvalue step?

Well, that works:
{"mailadres":"rene@taxivanderbles.nl"} is returned, which is correct

So the value is passed properly. How’s your mail/send mail set up?

as server default. Using SMTP throws the same error

But how/where is it defined?

Ah, mail set up is defined under Globals

Sendmail setup under SC

@Teodor: no response yet, so I assume there really is some problem within Wappler?

No I couldn’t recreate this issue.
Try entering a static value in the From address and test.

Different error this time:
{"code":2,"file":"\/var\/www\/domains\/ov-makkum.nl\/www\/dmxConnectLib\/PHPMailer\/PHPMailer\/PHPMailer.php","line":1684,"message":"Could not execute: \/usr\/sbin\/sendmail -t -i -f webmaster@ov-makkum.nl","trace":"#0 \/var\/www\/domains\/ov-makkum.nl\/www\/dmxConnectLib\/PHPMailer\/PHPMailer\/PHPMailer.php(1599): PHPMailer\\PHPMailer\\PHPMailer->sendmailSend('Date: Tue, 16 F...', 'This is content...')\n#1 \/var\/www\/domains\/ov-makkum.nl\/www\/dmxConnectLib\/PHPMailer\/PHPMailer\/PHPMailer.php(1437): PHPMailer\\PHPMailer\\PHPMailer->postSend()\n#2 \/var\/www\/domains\/ov-makkum.nl\/www\/dmxConnectLib\/modules\/mail.php(132): PHPMailer\\PHPMailer\\PHPMailer->send()\n#3 \/var\/www\/domains\/ov-makkum.nl\/www\/dmxConnectLib\/lib\/App.php(193): modules\\mail->send(Object(stdClass), '')\n#4 \/var\/www\/domains\/ov-makkum.nl\/www\/dmxConnectLib\/lib\/App.php(157): lib\\App->execSteps(Object(stdClass))\n#5 \/var\/www\/domains\/ov-makkum.nl\/www\/dmxConnectLib\/lib\/App.php(127): lib\\App->execSteps(Array)\n#6 \/var\/www\/domains\/ov-makkum.nl\/www\/dmxConnectLib\/lib\/App.php(116): lib\\App->exec(Object(stdClass), false)\n#7 \/var\/www\/domains\/ov-makkum.nl\/www\/dmxConnectLib\/lib\/App.php(94): lib\\App->exec(Object(stdClass))\n#8 \/var\/www\/domains\/ov-makkum.nl\/www\/dmxConnect\/api\/pages\/lidworden\/lidinsert.php(8): lib\\App->define(Object(stdClass))\n#9 {main}"}

Perhaps it would help if I do a clean install of Wappler?
It did help others to solve these kind of problems

Well then you probably have some issue with the mail server setup. Are you 100% sure you configured the send mail properly?

Finally got things working. Total misinformation from my hoster.
Now only issue #1 remaining: mailbody empties on save. Only static text will stick

This will be fixed in this weeks update. You can enter what you need without opening the edit dialog.

Ah, special trick.

  • add what you need in the edit dialog
  • before saving, copy the entries
  • save
  • paste entries without opening dialog
  • entries will stick
    I am happy again
2 Likes

This has been fixed in Wappler 3.7.7