• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Script to Send Form Fields

Script to Send Form Fields 17 years 5 months ago #1374

  • yaani
  • yaani's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 41
  • Thank you received: 4
Hi,

I am using the notification email to send a price list that is sent after the form is completed.

Can someone tell me the script I could use to send another email to the admin with the data from the fields of the form?

Or I could use the notification email to send the admin the data in the fields and a script to send an email with a price list attachment?

I don't know how to write scripts but I will do some research & see if I can figure out how to do this.

Maybe if RSform sent out two emails one to the admin & one to the form filler (that are different) it would be useful.
The administrator has disabled public write access.

Re:Script to Send Form Fields 17 years 5 months ago #1376

  • yaani
  • yaani's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 41
  • Thank you received: 4
OK. I managed to send an email using the following code

//define the receiver of the email
$to = ' This e-mail address is being protected from spambots. You need JavaScript enabled to view it ';
//define the subject of the email
$subject = 'Price List Data';
//define the message to be sent. Each line should be separated with \n
$message = \"{companyname}\n\nThis is my first mail.\";
//define the headers we want passed. Note that they are separated with \r\n
$headers = \"From: myemailaddress@verizon.net\r\nReply-To: myemailaddress@verizon.net\";
//send the email
$mail_sent = @mail( $to, $subject, $message, $headers );
//if the message is sent successfully print \"Mail sent\". Otherwise print \"Mail failed\"
echo $mail_sent ? \"Mail sent\" : \"Mail failed\";

The only problem is I don't know how to code it to put the form fields in the email. The email arrives with the text.

\"{companyname}

This is my first email\"

How do I code it so the data entered in the form field \"companyname\" appears in the email?

Thanks,
Yaani-Mai<br><br>Post edited by: yaani, at: 2007/12/01 18:06
The administrator has disabled public write access.

Re:Script to Send Form Fields 17 years 4 months ago #1540

Hello Yaani-Mai,

just try the forum search and find this:
www.rsjoomla.com/index.php/RSform-How-To...iled-to-Me.html#1537

Sunny regards

Kurts Steiner
The administrator has disabled public write access.

Re:Script to Send Form Fields 17 years 2 months ago #2047

  • dniezby
  • dniezby's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 136
  • Thank you received: 2
Hmm, why are you guys not using the built in eMail processor? The program already eMails the information you create in your forms. That's what it's designed for. You don't need any scripts to send an eMail....OOOORRRR

Are you using an older version of RSform? I've only used the current version.
Dave Niezby
www.nsfilms.com
Nightshade Studios, CEO
The administrator has disabled public write access.

Re:Script to Send Form Fields 16 years 11 months ago #2987

  • yaani
  • yaani's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 41
  • Thank you received: 4
I am using the built in email processor to email the form submitter a Price List. I would like to write a script to send a different email to my client that has the form fields listed on it.
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!