Jump to content

1 form to email different people


retrobsession

Recommended Posts

Hi everyone,

 

First post for me so here goes. :)

 

I have a for sale section on my website but I want people to be able to click on a link next to the item that allows them to email the recipient, is there some code that will alow me to handle it all from one contact form for all contacts.

 

Thanks,

 

Mark

Link to comment
Share on other sites

Its not really clear what your trying to do, but you could simply have a text field which your users can input email addresses seperated by , then simply explode by , to send the emails. eg;

 

<?php

  if (isset($_POST['submit'])) {
    $recipients = explode(',',$_POST['recipients']);
    foreach ($recipients as $email) {
      // send mail.
    }
  }

?>

Link to comment
Share on other sites

Hi, I'll try and explain a little more :)

 

Ok, e.g. I have 10 items for sale on my for sale page by 10 different people and a potential seller wants to contact any one them.

 

I want them to be able to click on a link which will launch a contact form, they will fill in item of interest, their email address, press submit and the email will go to the particular seller.

 

I know I could create a contact form for each person/item but that is a lot of work so I was wondering if I could acheive the same using a single file but referecing a list with all the individual email addresses in so if they sellect contact seller 1, the email goes to seller 1 and so on.

 

e.g. item 1 - seller email = blah@blah.com, item 2 - seller email = blah2@blah2.com

 

Thanks,

 

Mark

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.