Contact Form with sending mail
Added by P K over 9 years ago
Hello,
I have a simple contact form that requires the user to fill the data like name, surname, email address, subject and the text of the contact message. Now I want to implement the submit button to send a simple email, but I'm not quite sure how to do that. Should I use void Wt::Auth::AuthService::sendMail() function? If yes, is there an example of how such mail message should be prepared?
Basically I want to send this user an email like: "Thank you for contacting us, we will reply soon" or sth like that. So it's just simply using Wt to send an email message to the given address.
Thank you in advance for help.
Replies (2)
RE: Contact Form with sending mail - Added by Koen Deforche over 9 years ago
You're probably better of just using Wt/Mail/Client directly? See the example at:
http://www.webtoolkit.eu/wt/doc/reference/html/classWt_1_1Mail_1_1Client.html
RE: Contact Form with sending mail - Added by P K over 9 years ago
Koen thank you for your advice. I checked out the example you provided, added it to my project and changed the recipient to one of my email addresses, but unfortunately it's not working. Should I have my project configured in some way?