TOPIC:

Trying to get multiple emails to work 11 months 2 hours ago #267604

  • Topic Author
  • ElectricFarmer
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 4
  • Thanks: 0
Hi,

I am trying to get the custom form results sent to more than one email address. Using the following I get the properly formatted email arriving at the first email address, and only an unformatted email to the second address. Have I got this submit piece wrong?

$this->execPieceByName('ff_InitLib');
$from = 'noreply@website.co.uk';
$fromname = 'Website';
$subject = 'Your Email Subject';
$recipient = 'email1@example.co.uk'; 'email2@example.co.uk'; //or ff_getSubmit('nameofemailfield');

$body = '';

foreach ($this->maildata as $data) {
$body .= $data[_FF_DATA_TITLE].": ".$data[_FF_DATA_VALUE].nl() . "\r\n";
}

$mode =false;
$attachment=null;

$this->sendMail($from, $fromname, $recipient, $subject, $body, $mode, $attachment, $cc, $bcc);

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

Trying to get multiple emails to work 11 months 2 hours ago #267608

  • tihana.krivic's Avatar
  • tihana.krivic
  • Away
  • Moderator
  • Moderator
  • Posts: 11812
  • Karma: 3
  • Thanks: 763
Hi,

this part of code:
$recipient = 'email1@example.co.uk'; 'email2@example.co.uk'; 
change to :
$recipient = 'email1@example.co.uk, email2@example.co.uk'; 

Regards,
Tihana

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

Last edit: Post by tihana.krivic.

Trying to get multiple emails to work 10 months 4 weeks ago #267632

  • Topic Author
  • ElectricFarmer
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 4
  • Thanks: 0
Have tried many different ways to get an HTML email to be delivered to two addresses. I made the alteration you suggested but no emails were sent.

I have had a look at the error log and found the following;

[07-Jan-2022 10:24:03 UTC] PHP Notice: Undefined variable: cc in /home/kzxteasi/public_html/components/com_breezingforms/facileforms.process.php(1245) : eval()'d code on line 16
[07-Jan-2022 10:24:03 UTC] PHP Notice: Undefined variable: bcc in /home/kzxteasi/public_html/components/com_breezingforms/facileforms.process.php(1245) : eval()'d code on line 16

Is this something you have seen before?

Steve

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

Trying to get multiple emails to work 10 months 4 weeks ago #267634

  • tihana.krivic's Avatar
  • tihana.krivic
  • Away
  • Moderator
  • Moderator
  • Posts: 11812
  • Karma: 3
  • Thanks: 763
Hi,

please use this code :
$this->execPieceByName('ff_InitLib');
$from = 'noreply@website.co.uk';
$fromname = 'Website';
$subject = 'Your Email Subject';
$recipient = 'email1@example.co.uk, email2@example.co.uk'; //or ff_getSubmit('nameofemailfield');

$body = '';

foreach ($this->maildata as $data) {
$body .= $data[_FF_DATA_TITLE].": ".$data[_FF_DATA_VALUE].nl() . "\r\n";
}
$this->sendMail($from, $fromname, $recipient, $subject, $body);

Let me know the result

Regards,
Tihana

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

Trying to get multiple emails to work 10 months 4 weeks ago #267639

  • Topic Author
  • ElectricFarmer
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 4
  • Thanks: 0
Having used the revised code for the Submit Pieces the recorded errors have gone, however I'm still unable to get any outbound emails.

Oddly I made a tweak to the form relating to the number of characters allowed in a free text field and the change was not saved. Went through the process a few times. I have tried both Safari and Chrome browsers and can see that changes are not being saved in all cases, for example in frustration I added a second email address to the properties/mail recipients field and this is not being saved either.

Is it possible to securely send you login details so you can take a look and verify that I have not made a configuration error?

Steve

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

Trying to get multiple emails to work 10 months 4 weeks ago #267640

  • tihana.krivic's Avatar
  • tihana.krivic
  • Away
  • Moderator
  • Moderator
  • Posts: 11812
  • Karma: 3
  • Thanks: 763
Hi,

yes, please send me login information, and backend link.

Use this tag:
[confidential]
[/confidential]

P.S: please write name of form

I will test everything using my mail

Regards,
Tihana

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

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

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

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!