Jump to content
Larry Ullman's Book Forums

Create A Contact Form To Send Mail To Email Id Of Another Model's Entry.

Recommended Posts

hello everyone..

i have a form to store values for a model add having rows id name description and one is email to store email for particular entry.

Now i want a contact form to send mail for that particular model values...

that is to send mail to the owner of particular add..

I able to reuse contact form for that purpose but i fail to fetch saved email id for each add so that any viewer can mail for adds..


How to achive this task?? please help me someone..

let me know the how can i do this??

if any example code will be very useful to me..

Thank you.....

Link to post
Share on other sites

If I understand you correctly, you want something in the form that lists the models in order to select to whom the email should go. Then, when the form is submitted, you'd use the selected model ID to retrieve that model and get the email address. Then you'd just send the email. 


You'd want to create a non-Active Record model to represent the form, too, as in the contact form.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...