TOPIC:

using submitter name and email in notification 3 weeks 2 days ago #252321

  • Topic Author
  • mecsysbf
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 17
  • 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 2 weeks 6 days ago #252357

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 3038
  • Karma: 3
  • Thanks: 260
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.
  • Page:
  • 1
Moderators: ForumSupport
Time to create page: 0.045 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!