TOPIC:

attachments in email 10 years 11 months ago #40333

  • next4ideas's Avatar Topic Author
  • next4ideas
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 9
  • Thanks: 0
The support gave us a code, to get the file attached to email. but the result was this.
Nome: teste

DDD + Telefone : 11 55555555

E-mail: andre@next4.com.br

Selecione o contato: Comercial

Deixe sua mensagem: teste

Enviar arquivo: /var/www/vhosts/next4dev.com/httpdocs/clientes/p3image/components/com_facileforms/uploads/certisign.png

And the file is not attached, and the file path is not linked I would leave it like <a href=" www.site.com.br/upload/arquivo.xxx "> Download .

Follow past the code above.
$this->execPieceByName('ff_InitLib');
$from = ff_getSubmit('email');
$fromname = ff_getSubmit('Name');
$subject = 'Envio Finalizado'; // Change to your preferred Email subject
$recipient = 'andre@next4.com.br'; // Change to your admin Email address
$body = '';
        $attachToAdminMail = JRequest::getVar('attachToAdminMail', array());
        if (count($this->maildata)){
            foreach ($this->maildata as $data){
                if( isset($attachToAdminMail[$data[_FF_DATA_NAME]]) ){
                    $testEx = explode("\n", trim($data[_FF_DATA_VALUE]));
                    $cntTestEx = count($testEx);
                    if($cntTestEx > 1){
                        for($ex = 0; $ex < $cntTestEx; $ex++){
                            if(!is_array($attachment) && $attachment != ''){
                                $attachment = array_merge(array(trim($testEx[$ex])), array($attachment));
                            } else if(is_array($attachment)){
                                $attachment = array_merge(array(trim($testEx[$ex])), $attachment);
                            }else {
                                $attachment = trim($testEx[$ex]);
                            }
                        }
                    } else {
                        if(!is_array($attachment) && $attachment != ''){
                            $attachment = array_merge(array(trim($data[_FF_DATA_VALUE])), array($attachment));
                        } else if(is_array($attachment)){
                            $attachment = array_merge(array(trim($data[_FF_DATA_VALUE])), $attachment);
                        }else {
                            $attachment = trim($data[_FF_DATA_VALUE]);
                        }
                    }
                }
            }
        }


foreach ($this->maildata as $data) {

  if( $data[_FF_DATA_NAME] == 'upload' )
{
   $body .= $data[_FF_DATA_TITLE].': http://www.next4dev.com/clientes/p3image/components/com_facileforms/uploads' . basename($data[_FF_DATA_VALUE]);
} else {
   $body .= $data[_FF_DATA_TITLE].": ".$data[_FF_DATA_VALUE].nl() . "\r\n";

  }
}

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


I also need to send multiple emails as selected in the tag <select>
need to know how to do this process?

How to identify the select variable? and their contents?

tipe:
if(select == 'administrator')
$this->sendMail($from, $fromname, 'andre@next4.com.br', $subject, $body, $attachment);
else if(select == 'comercial')
$this->sendMail($from, $fromname, 'comercial@next4.com.br', $subject, $body, $attachment);

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

Last edit: Post by next4ideas.

Re: attachments in email 10 years 9 months ago #46907

  • wfelton
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 1
  • Thanks: 0
I need some help with this too. I have copied the code from the knowledge base but no email is being sent. I want users to attach a file and have it sent to a single email address that holds the files.
I think the problem is with the "sendmail" function. My native sendmail does not work since my server sends through the gmail smtp server with authentication. Does the "sendmail" command use the configured mail setting from the Joomla global configuration?
My email setting in the Global Config are
SMTP Authentication: Yes
SMTP port: 465
SMTP Username: website@mydomain.com
SMTP password: *************
SMTP Host: smtp.gmail.com

I have modified all of the fields in the given code like 'recipient' and 'from' but am getting nothing. After many hours of working on this code, I need some help.
Thank
Will

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

Re: attachments in email 10 years 8 months ago #47885

  • velvetace
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 2
  • Thanks: 0
I'm having the same issue. This error pops up briefly before the thank you message appears, and no email is sent to admins.

Parse error: syntax error, unexpected T_STRING in .../components/com_brezzingforms/facileforms.process.php(1058) : eval()'d code on line 4

Thanks for any help.

Don

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

Re: attachments in email 10 years 8 months ago #47887

  • velvetace
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 2
  • Thanks: 0
Found the solution and it's so simple! When you insert a new File Upload element, click on the "Advanced" tab. About halfway down is a checkbox "Attach to admin mail(s)"....check it!

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

  • Page:
  • 1
Moderators: ForumSupport
Time to create page: 0.048 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!