8000 Did not change .env file, Mailgun shows no connection but can be reached in CLI. Mailer for verifications is broken. · Issue #1431 · appwrite/appwrite · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Did not change .env file, Mailgun shows no connection but can be reached in CLI. Mailer for verifications is broken. #1431

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
badmark opened this issue Jul 27, 2021 · 4 comments

Comments

@badmark
Copy link
badmark commented Jul 27, 2021

Logs:

`[notice] Starting worker bf545f0f8880:7:v1-mails,Appwrite mails worker v1 has started
},
#4 /usr/src/code/vendor/resque/php-resque/bin/resque(185): Resque_Worker->work('1', false),�,
#2 /usr/src/code/vendor/resque/php-resque/lib/Resque/Worker.php(303): Resque_Job->perform(),
#3 /usr/src/code/vendor/resque/php-resque/lib/Resque/Worker.php(242): Resque_Worker->perform(Object(Resque_Job)),�
Stack trace:,
#0 /usr/src/code/src/Appwrite/Resque/Worker.php(22): MailsV1->run(),
#1 /usr/src/code/vendor/resque/php-resque/lib/Resque/Job.php(201): Appwrite\Resque\Worker->perform(),
[critical] (Job{v1-mails} | ID: a94c4d48421ea61797436812b43fc466 | MailsV1 | [{"event":"account.verification.create","from":"development Team","recipient":"testuser21@xxxxx.com","name":"testuser21","subject":"Account Verification","body":"<!doctype html>\n\n\n\n <meta name="viewport" content="width=device-width" />\n <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\n <title>Account Verification</title>\n <style>\n body {\n background-color: #f7f7f7;\n color: #000000;\n font-family: sans-serif;\n -webkit-font-smoothing: antialiased;\n font-size: 14px;\n line-height: 1.4;\n margin: 0;\n padding: 0;\n -ms-text-size-adjust: 100%;\n -webkit-text-size-adjust: 100%;\n }\n\n table {\n border-collapse: separate;\n mso-table-lspace: 0pt;\n mso-table-rspace: 0pt;\n width: 100%;\n }\n\n table td {\n font-family: sans-serif;\n font-size: 14px;\n vertical-align: top;\n }\n\n .body {\n background-color: #f7f7f7;\n width: 100%;\n }\n\n .container {\n display: block;\n margin: 0 auto !important;\n max-width: 580px;\n padding: 10px;\n width: 580px;\n }\n\n .content {\n box-sizing: border-box;\n display: block;\n margin: 0 auto;\n max-width: 580px;\n padding: 10px;\n color: #000000;\n }\n\n .main {\n background: #ffffff;\n border-radius: 10px;\n width: 100%;\n }\n\n .wrapper {\n box-sizing: border-box;\n padding: 30px 30px 15px 30px;\n }\n\n .content-block {\n padding-bottom: 10px;\n padding-top: 10px;\n }\n\n p {\n font-family: sans-serif;\n font-size: 14px;\n font-weight: normal;\n margin: 0;\n margin-bottom: 15px;\n }\n\n a {\n word-break: break-all;\n }\n\n .btn {\n box-sizing: border-box;\n width: 100%;\n }\n\n .btn>tbody>tr>td {\n padding-bottom: 15px;\n }\n\n .btn table {\n width: auto;\n }\n\n .btn table td {\n background-color: #ffffff;\n border-radius: 20px;\n text-align: center;\n }\n\n .btn a {\n background-color: #ffffff;\n border-radius: 20px;\n box-sizing: border-box;\n color: #577590;\n cursor: pointer;\n display: inline-block;\n font-size: 14px;\n font-weight: bold;\n margin: 0;\n padding: 12px 25px;\n text-decoration: none;\n text-transform: capitalize;\n }\n\n .btn-primary table td {\n background-color: #073b4c;\n }\n\n .btn-primary a {\n background-color: #073b4c;\n color: #ffffff;\n }\n\n @media only screen and (max-width: 620px) {\n .container {\n padding: 0;\n width: 100%;\n }\n\n .btn-primary a {\n font-size: 13px;\n }\n }\n\n @media all {\n .ExternalClass {\n width: 100%;\n }\n\n .ExternalClass,\n .ExternalClass p,\n .ExternalClass span,\n .ExternalClass font,\n .ExternalClass td,\n .ExternalClass div {\n line-height: 100%;\n }\n\n .apple-link a {\n color: inherit !important;\n font-family: inherit !important;\n font-size: inherit !important;\n font-weight: inherit !important;\n line-height: inherit !important;\n text-decoration: none !important;\n }\n\n #MessageViewBody a {\n color: inherit;\n text-decoration: none;\n font-size: inherit;\n font-family: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n\n .btn-primary table td:hover {\n opacity: 0.7 !important;\n }\n\n .btn-primary a:hover {\n opacity: 0.7 !important;\n }\n }\n </style>\n</head>\n\n<body style="direction: ltr">\n <table role="presentation" border="0" cellpadding="0" cellspacing="0" class="body">\n \n  </td>\n <td class="container">\n <div class="content">\n <table role="presentation" class="main">\n \n <td class="wrapper">\n <table role="presentation" border="0" cellpadding="0" cellspacing="0">\n \n

\n Hello testuser20,\n</p>\n

\n Follow this link to verify your email address.\n</p>\n<table role="presentation" border="0" cellpadding="0" cellspacing="0" class="btn btn-primary">\n \n \n \n <table role="presentation" border="0" cellpadding="0" cellspacing="0">\n \n \n \n <a href="http://localhost:3000/verify?userId=60ff66ffe2037&secret=f0f4af8932b4c0967f5f4bcb034408502debebd7bab61199189cb0028f68c70e41ad01feeddf8b70fc522c40ace817ab47ccd71a1ea7606c0c2744332cebde33a7fcb815a616f031e9f92f5cd6e4c7c67c417c3d3cefeab6246a39616b2135f0263e786f1541a5796c1c00bcca49203b135a34a6420d2a0f7015c07a61b2e616&expire=1627955584" target="_blank">\n Account Verification\n </a>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n</table>\n

\n <a href="http://localhost:3000/verify?userId=60ff66ffe2037&secret=f0f4af8932b4c0967f5f4bcb034408502debebd7bab61199189cb0028f68c70e41ad01feeddf8b70fc522c40ace817ab47ccd71a1ea7606c0c2744332cebde33a7fcb815a616f031e9f92f5cd6e4c7c67c417c3d3cefeab6246a39616b2135f0263e786f1541a5796c1c00bcca49203b135a34a6420d2a0f7015c07a61b2e616&expire=1627955584" target="_blank">\n http://localhost:3000/verify?userId=60ff66ffe2037&secret=f0f4af8932b4c0967f5f4bcb034408502debebd7bab61199189cb0028f68c70e41ad01feeddf8b70fc522c40ace817ab47ccd71a1ea7606c0c2744332cebde33a7fcb815a616f031e9f92f5cd6e4c7c67c417c3d3cefeab6246a39616b2135f0263e786f1541a5796c1c00bcca49203b135a34a6420d2a0f7015c07a61b2e616&expire=1627955584\n </a>\n</p>\n

\n If you didn\u2019t ask to verify this address, you can ignore this message.\n</p>\n

\n Thanks,\n <br />\n xxxxxxxx team\n</p></td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n </div>\n\n \n </td>\n  </td>\n </tr>\n </table>\n</body>\n\n</html>"}]) has failed Exception: Error sending mail: SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting in /usr/src/code/app/workers/mails.php:67,
[notice] Starting work on (Job{v1-mails} | ID: a94c4d48421ea61797436812b43fc466 | MailsV1 | [{"event":"account.verification.create","from":"xxxxxxx Team","recipient":testuser20@xxxxx.com","name":"testuser20","subject":"Account Verification","body":"<!doctype html>\n\n\n\n <meta name="viewport" content="width=device-width" />\n <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />\n <title>Account Verification</title>\n <style>\n body {\n background-color: #f7f7f7;\n color: #000000;\n font-family: sans-serif;\n -webkit-font-smoothing: antialiased;\n font-size: 14px;\n line-height: 1.4;\n margin: 0;\n padding: 0;\n -ms-text-size-adjust: 100%;\n -webkit-text-size-adjust: 100%;\n }\n\n table {\n border-collapse: separate;\n mso-table-lspace: 0pt;\n mso-table-rspace: 0pt;\n width: 100%;\n }\n\n table td {\n font-family: sans-serif;\n font-size: 14px;\n vertical-align: top;\n }\n\n .body {\n background-color: #f7f7f7;\n width: 100%;\n }\n\n .container {\n display: block;\n margin: 0 auto !important;\n max-width: 580px;\n padding: 10px;\n width: 580px;\n }\n\n .content {\n box-sizing: border-box;\n display: block;\n margin: 0 auto;\n max-width: 580px;\n padding: 10px;\n color: #000000;\n }\n\n .main {\n background: #ffffff;\n border-radius: 10px;\n width: 100%;\n }\n\n .wrapper {\n box-sizing: border-box;\n padding: 30px 30px 15px 30px;\n }\n\n .content-block {\n padding-bottom: 10px;\n padding-top: 10px;\n }\n\n p {\n font-family: sans-serif;\n font-size: 14px;\n font-weight: normal;\n margin: 0;\n margin-bottom: 15px;\n }\n\n a {\n word-break: break-all;\n }\n\n .btn {\n box-sizing: border-box;\n width: 100%;\n }\n\n .btn>tbody>tr>td {\n padding-bottom: 15px;\n }\n\n .btn table {\n width: auto;\n }\n\n .btn table td {\n background-color: #ffffff;\n border-radius: 20px;\n text-align: center;\n }\n\n .btn a {\n background-color: #ffffff;\n border-radius: 20px;\n box-sizing: border-box;\n color: #577590;\n cursor: pointer;\n display: inline-block;\n font-size: 14px;\n font-weight: bold;\n margin: 0;\n padding: 12px 25px;\n text-decoration: none;\n text-transform: capitalize;\n }\n\n .btn-primary table td {\n background-color: #073b4c;\n }\n\n .btn-primary a {\n background-color: #073b4c;\n color: #ffffff;\n }\n\n @media only screen and (max-width: 620px) {\n .container {\n padding: 0;\n width: 100%;\n }\n\n .btn-primary a {\n font-size: 13px;\n }\n }\n\n @media all {\n .ExternalClass {\n width: 100%;\n }\n\n .ExternalClass,\n .ExternalClass p,\n .ExternalClass span,\n .ExternalClass font,\n .ExternalClass td,\n .ExternalClass div {\n line-height: 100%;\n }\n\n .apple-link a {\n color: inherit !important;\n font-family: inherit !important;\n font-size: inherit !important;\n font-weight: inherit !important;\n line-height: inherit !important;\n text-decoration: none !important;\n }\n\n #MessageViewBody a {\n color: inherit;\n text-decoration: none;\n font-size: inherit;\n font-family: inherit;\n font-weight: inherit;\n line-height: inherit;\n }\n\n .btn-primary table td:hover {\n opacity: 0.7 !important;\n }\n\n .btn-primary a:hover {\n opacity: 0.7 !important;\n }\n }\n </style>\n</head>\n\n<body style="direction: ltr">\n <table role="presentation" border="0" cellpadding="0" cellspacing="0" class="body">\n \n  </td>\n <td class="container">\n <div class="content">\n <table role="presentation" class="main">\n \n <td class="wrapper">\n <table role="presentation" border="0" cellpadding="0" cellspacing="0">\n \n

\n Hello testuser21,\n</p>\n

\n Follow this link to verify your email address.\n</p>\n<table role="presentation" border="0" cellpadding="0" cellspacing="0" class="btn btn-primary">\n \n \n \n <table role="presentation" border="0" cellpadding="0" cellspacing="0">\n \n \n \n <a href="http://localhost:3000/verify?userId=60ff66ffe2037&secret=f0f4af8932b4c0967f5f4bcb034408502debebd7bab61199189cb0028f68c70e41ad01feeddf8b70fc522c40ace817ab47ccd71a1ea7606c0c2744332cebde33a7fcb815a616f031e9f92f5cd6e4c7c67c417c3d3cefeab6246a39616b2135f0263e786f1541a5796c1c00bcca49203b135a34a6420d2a0f7015c07a61b2e616&expire=1627955584" target="_blank">\n Account Verification\n </a>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n</table>\n

\n <a href="http://localhost:3000/verify?userId=60ff66ffe2037&secret=f0f4af8932b4c0967f5f4bcb034408502debebd7bab61199189cb0028f68c70e41ad01feeddf8b70fc522c40ace817ab47ccd71a1ea7606c0c2744332cebde33a7fcb815a616f031e9f92f5cd6e4c7c67c417c3d3cefeab6246a39616b2135f0263e786f1541a5796c1c00bcca49203b135a34a6420d2a0f7015c07a61b2e616&expire=1627955584" target="_blank">\n http://localhost:3000/verify?userId=60ff66ffe2037&secret=f0f4af8932b4c0967f5f4bcb034408502debebd7bab61199189cb0028f68c70e41ad01feeddf8b70fc522c40ace817ab47ccd71a1ea7606c0c2744332cebde33a7fcb815a616f031e9f92f5cd6e4c7c67c417c3d3cefeab6246a39616b2135f0263e786f1541a5796c1c00bcca49203b135a34a6420d2a0f7015c07a61b2e616&expire=1627955584\n </a>\n</p>\n

\n If you didn\u2019t ask to verify this address, you can ignore this message.\n</p>\n

\n Thanks,\n <br />\n xxxxxxxx team\n</p></td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n </div>\n\n \n </td>\n  </td>\n </tr>\n </table>\n</body>\n\n</html>"}]),

#3 /usr/src/code/vendor/resque/php-resque/lib/Resque/Worker.php(242): Resque_Worker->perform(Object(Resque_Job)),�,
},
#4 /usr/src/code/vendor/resque/php-resque/bin/resque(185): Resque_Worker->work('1', false),
#2 /usr/src/code/vendor/resque/php-resque/lib/Resque/Worker.php(303): Resque_Job->perform(),
#0 /usr/src/code/src/Appwrite/Resque/Worker.php(22): MailsV1->run(),
#1 /usr/src/code/vendor/resque/php-resque/lib/Resque/Job.php(201): Appwrite\Resque\Worker->perform(),�
Stack trace:
`


Appwrite Version: 0.9.2.150

@TorstenDittmann
Copy link
Contributor

Hey 👋🏻

Can you share the output of docker-compose exec appwrite-worker-mails vars?

PS: Make sure to hide any secrets 🙂

@manoelfilho
Copy link

I am interested to use AppWrite, but this email question is strange. I tried everything with Mailgun and Sendgrid options but nothing worked here. Can you help me?

_APP_SYSTEM_EMAIL_NAME=Name
_APP_SYSTEM_EMAIL_ADDRESS=authorized_email_in_sendgrid

  • _APP_SMTP_HOST=smtp.sendgrid.net
  • _APP_SMTP_PORT=587
  • _APP_SMTP_SECURE=tls
  • _APP_SMTP_USERNAME=SG.7*** key of sendgrid
  • _APP_SMTP_PASSWORD=636*** key of my appwrite

@stnguyen90
Copy link
Contributor

@manoelfilho the value starting with SG should be your password. I believe username should be apikey. I use port 465 for my smtp port and ssl for _APP_SMTP_SECURE. Would you please try again (maybe with a newer version of Appwrite) and let us know if you still have a problem and what the error is? Newer versions of Appwrite output more info about why the the mail didn't send.

@manoelfilho
Copy link

Sorry @stnguyen90 ! I really didn't see your answer. I was 65CD looking for an alternative API for our project with iOS, but I was cancelled. Thank you a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
0