dchun / QuoteManager

Saas App for Managing Quotes and getting paid
https://quotemanager.boopis.com
0 stars 0 forks source link

Email User When Form Is Successfully Submitted #51

Closed dchun closed 9 years ago

dchun commented 9 years ago

When someone submits a form, we need to send an email with the following:

to: emails in settings of form reply-to: submitted value from email field in form *bcc: email to send to our server to change state of request from: we can either send mail with sendmail or create an email and send with smtp subject: "Request From #" + id_of_form + " " + title_of_form body: request fields and values

*For the bcc field we need to add a field to the Request Model which will hold the state of the request. When a new request is made the default state is "new".

When we send an email either through the email that was sent in response to our autoresponder by parsing the subject line and finding the first string that following the "#" sign with regex, or, via the quote generator (which will also send an email), the state of the request will need to change to "pending".

Then the user can manually change the state to "complete" or if there is a quote that was made and the user signed the quote, we can programmatically change the Request state to "complete"

phuong3030 commented 9 years ago

I think when someone submits a form, he will create request to server and in request controller, we can send emails to all salesman emails, update request state to new. So we don't need to fill the bcc field.

When a salesman creates a quote, a quote is new state, a request is pending state. When a salesman sends a quote, a quote is pending state, a request is pending state. When a user sign a quotes, a quote is completed state, a request is completed state.

phuong3030 commented 9 years ago

https://github.com/boopis/QuoteManager/pull/83

Be careful, if you use gmail account because google prevent your logging action from less secure application. Please go to gmail setting to turn on logging by less secure apps.

form email setting sender receiver