TOPIC:

using submitter name and email in notification 5 months 3 weeks ago #252321

  • Topic Author
  • mecsysbf
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 20
  • Thanks: 0
I am trying to change the "From email" and "From email" on notification sent to admin.
I found the page crosstec.org/en/support/online-documenta...-name-and-email.html
explaining what to do.
First option: with single name field didn't send notification email at all. Looks like it's missing the "sendmail' line
Second option: with separate first and last name failed with a message saying
TOO FEW ARGUMENTS TO FUNCTION HTML_FACILEFORMSPROCESSOR::SENDMAIL(), 4 PASSED IN /HOME/GOLDENTR/PUBLIC_HTML/CMSGTR/COMPONENTS/COM_BREEZINGFORMS/FACILEFORMS.PROCESS.PHP(1246) : EVAL()'D CODE ON LINE 17 AND AT LEAST 5 EXPECTED
Tried adding a 5th, null option ,''
that didn't fail, but it didn't send the notification either.

Testing form at goldentreasuresrescue.org/cmsgtr/test-page , which is currently set with the 5th parameter, and gets above error.

What is the correct code to have admin notification email use form email and name for the From email and From name?
thanks,

Mary

Please Log in or Create an account to join the conversation.

using submitter name and email in notification 5 months 2 weeks ago #252357

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 6113
  • Karma: 3
  • Thanks: 432
Hi,

sorry for late reply, I haven't been here in a few days

I tested it, and with this works on my example:
$this->execPieceByName('ff_InitLib');
$from = ff_getSubmit('email');
$fromname = ff_getSubmit('name');
$subject = 'Your Email Subject'; // Change to your preferred Email subject
$recipient = 'tihana.krivic@crosstec.org'; // Change to your admin Email address
$body = '';
foreach ($this->maildata as $data) {
 if ($data[_FF_DATA_TYPE] != 'hidden') {
$body .= $data[_FF_DATA_TITLE].": ".$data[_FF_DATA_VALUE].nl();
}
}

$this->sendMail($from, $fromname, $recipient, $subject, $body, $attachment);  // This line actually emails the form.

Please replace:
email in ff_getSubmit('email'); with name of your email field (not title)
name in ff_getSubmit('name'); with name of your name field (not title)
$recipient='tihana.krivic@crosstec.org'; my email address with yours

Let me know if you need more help

Regards,
Tihana

Please Log in or Create an account to join the conversation.

Last edit: Post by tihana.krivic.

using submitter name and email in notification 1 month 1 week ago #258781

  • Topic Author
  • mecsysbf
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 20
  • Thanks: 0
Hi Tihana,

Thanks for your helpful response. Took me awhile to test and it works, but I need to send the notification to more than one email address.
Tried putting in both addresses, separated by a ';' as we do in the "Mail Recipients" field, but that didn't work.
Also tried leaving the $recipient line out, hoping it would then use the addresses in the Mail Recipients field, but that didn't work either.
I'm sure it's me, not knowing the proper syntax.
Cn you help with this, too?

thanks,

Mary

Please Log in or Create an account to join the conversation.

using submitter name and email in notification 1 month 1 week ago #258783

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 6113
  • Karma: 3
  • Thanks: 432
Hi,

something like this:
$this->execPieceByName('ff_InitLib');
$from = ff_getSubmit('email');
$fromname = ff_getSubmit('name');
$subject = 'Your Email Subject'; // Change to your preferred Email subject
$recipient = 'tihana.krivic@crosstec.org'; // Change to your admin Email address
$recipient2='email@gmail.com'; //change it to your second email
$body = '';
foreach ($this->maildata as $data) {
 if ($data[_FF_DATA_TYPE] != 'hidden') {
$body .= $data[_FF_DATA_TITLE].": ".$data[_FF_DATA_VALUE].nl();
}
}

$this->sendMail($from, $fromname, $recipient,$recipient2, $subject, $body, $attachment);  // This line actually emails the form.

Regards,
Tihana

Please Log in or Create an account to join the conversation.

using submitter name and email in notification 1 month 1 week ago #258789

  • Topic Author
  • mecsysbf
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 20
  • Thanks: 0
Thanks for the quick response.

Tried that, but the second email is showing in the Subject line, and i don't get an email at the second email address.

Mary

Please Log in or Create an account to join the conversation.

using submitter name and email in notification 1 month 1 week ago #258792

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 6113
  • Karma: 3
  • Thanks: 432
Hi,

try it like this:
$this->execPieceByName('ff_InitLib');
$from = ff_getSubmit('email');
$fromname = ff_getSubmit('name');
$subject = 'Your Email Subject'; // Change to your preferred Email subject
$recipient = 'tihana.krivic@crosstec.org, email@domain.com'; // Change to your admin Email address
$body = '';
foreach ($this->maildata as $data) {
 if ($data[_FF_DATA_TYPE] != 'hidden') {
$body .= $data[_FF_DATA_TITLE].": ".$data[_FF_DATA_VALUE].nl();
}
}

$this->sendMail($from, $fromname, $recipient, $subject, $body, $attachment);  // This line actually emails the form.

Regards,
Tihana

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
  • 2
Moderators: ForumSupport
Time to create page: 0.075 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!