jonmbake / bootstrap3-contact-form

Bootstrap 3 Contact Form with Captcha
MIT License
169 stars 84 forks source link

Small edit to work with smtp.yandex #12

Closed id777 closed 8 years ago

id777 commented 8 years ago

Hello! In their web projects I'm using as SMTP to send mail - mail from Yandex. https://yandex.com/support/mail/mail-clients.xml But there is little restriction, Yandex sends mail only if the mail sender coincides with the mail account has been authorized on the server smtp.yandex.com . The mail is sent successfully only if the email address of the sender in a contact form (Email Address *) will match the email address of the account to which distribution is authorized on the server ($mail->Username) SMTP yandex. https://hsto.org/files/1c3/236/f61/1c3236f61ff347aaa736f0178cf37bc6.png

If the contact email of the sender does not match the email through which the sending SMTP server, emails are not sent. An error occurs: https://hsto.org/files/97b/73c/8d0/97b73c8d09884118b78c9117b7cb8196.png https://hsto.org/files/f5c/d85/62f/f5cd8562f8ca4ab68a3f16f5be9538b6.png

As I understand it, this is to prevent spamming attempts.

How can I solve this issue? In the email from the contact form in the "sender" field was added the same email via SMTP which is sending letters.

By the way, on their WordPress sites to send through SMTP I use a plugin https://ru.wordpress.org/plugins/wp-mail-bank/ , through his perfect sent emails with smtp yandex, as this plugin automatically sets the email message's sender to the email which are sent out via SMTP.

I hope it is clear explained. Sorry for my English, I use auto-translator.

jonmbake commented 8 years ago

Hey @id777. I made that fix here: https://github.com/jonmbake/bootstrap3-contact-form/commit/186f9927f0305af438aea438fb4e95d0af4c3007. Can you verify that it works before I close this issue?

id777 commented 8 years ago

Thank you very much for the fix! Now everything works fine and emails are sent via smtp yandex.

I've been looking for php for sending emails - and your project is the best thing I've ever seen.