2 emails and 2 different messages

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ctec2001
Forum Newbie
Posts: 3
Joined: Sun Mar 30, 2008 2:22 am

2 emails and 2 different messages

Post by ctec2001 »

I am attempting to send 2 different emails. 1 would be coming from a field in the form and have a message sent along with it. The other I would like to send to me when the form is filled out but send a different message to me. I have it working right now with one email being sent when the form is completed to the sender. I now need one sent to me telling me that someone has filled out the form. Please help.

Thank you in advance.
ctec2001
Forum Newbie
Posts: 3
Joined: Sun Mar 30, 2008 2:22 am

Re: 2 emails and 2 different messages

Post by ctec2001 »

Well, I have a form that will be filled out. When the sender completes and clicks the submit button, it send the sender an email with a message.

I would like to get an email as well, notifying me that someone has completed the form.
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Re: 2 emails and 2 different messages

Post by s.dot »

Code: Select all

$swift->send(); //to the user
$swift->send(); //to you
Of course you can specify different recipients, subjects, and bodies with each send().

:)
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
ctec2001
Forum Newbie
Posts: 3
Joined: Sun Mar 30, 2008 2:22 am

Re: 2 emails and 2 different messages

Post by ctec2001 »

scottayy wrote:

Code: Select all

$swift->send(); //to the user
$swift->send(); //to you
Of course you can specify different recipients, subjects, and bodies with each send().

:)

Is it difficult to install SWIFT? And would you mind pointing me into the right direction?
User avatar
s.dot
Tranquility In Moderation
Posts: 5001
Joined: Sun Feb 06, 2005 7:18 pm
Location: Indiana

Re: 2 emails and 2 different messages

Post by s.dot »

Oh, sorry.. I thought this was in the Swift mailer forum. 8O

Swift is not difficult to install, though. http://www.swiftmailer.org Good documentation.

However, you can use mail() in place of the $swift->send()'s.. but I wouldn't be a good patron recommending that over Swift. :)
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
AMCH
Forum Commoner
Posts: 31
Joined: Sun Mar 30, 2008 4:39 pm

Re: 2 emails and 2 different messages

Post by AMCH »

All you have to do is duplicate the code that is sending the message to the user and change a few variables so that it sends a message to you as well. :D
Post Reply