TEMA:

Attach a file to Mailback? 7 años 8 meses antes #147455

  • Avatar de ecnet Autor del tema
  • ecnet
  • Fuera de línea
  • Navegador Senior
  • Navegador Senior
  • Registered
  • Mensajes: 106
  • Gracias recibidas: 0
Is there a way to attach a file to the Mailback email? I'm not talking about sending the Mailback itself as a PDF, but to have a custom email as the Mailback message body and also attach a separate file (in this case, a PDF).

Thanks. :-)

Wendy

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Attach a file to Mailback? 7 años 8 meses antes #147461

  • Avatar de pedro81
  • pedro81
  • Fuera de línea
  • Navegador Platino
  • Navegador Platino
  • Registered
  • Mensajes: 15269
  • Gracias recibidas: 1077
Hello Wendy,

please, take a look at this kind of solution:
crosstec.org/en/forums/41-breezingforms-...mailback-fields.html

let us know if this helps.

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Attach a file to Mailback? 7 años 8 meses antes #147468

  • Avatar de ecnet Autor del tema
  • ecnet
  • Fuera de línea
  • Navegador Senior
  • Navegador Senior
  • Registered
  • Mensajes: 106
  • Gracias recibidas: 0
Hi Pedro,

It doesn't seem to be taking any of the settings in that code. The Mailback email arrived, using the settings entered into the Mailback screen.

I'm also using the referral code in the End Submit textarea (to redirect to another form, passing 3 variables). The passing of variables and redirection to the new form works fine. I put the attachment code before the redirect code. Here's the code (with samples used, not actual emails or links):

$this->execPieceByName('ff_InitLib');
$from = 'address@domain.com';
$fromname = 'From Name';
$subject = 'Your Email Subject'; // Change to your preferred Email subject
$recipient = ff_getSubmit('EmailElementName'); // Change to your admin Email address
$body = '';

 $attachment = array('http://domain.com/images/filename.pdf '); 

foreach ($this->maildata as $data) {
   $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.


$this->execPieceByName('ff_InitLib');
//Change ElementName to the name of the element which value you want to send to form2
$val1 = ff_getSubmit('moduletitle');
$val2 = ff_getSubmit('fullname');
$val3 = ff_getSubmit('useremail');

header("Location: http://domain.com/page?foo1=".$val1."&foo2=".$val2."&foo3=".$val3);
The email should arrive using the email address and From Name in the code (and of course with the PDF file attached), but none of that is happening. It is, however, redirecting as usual with the second segment of code.

Am I doing this wrong? Is that why it's not working?

Thanks,
Wendy

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Attach a file to Mailback? 7 años 1 mes antes #160108

  • Wuzzle
  • Fuera de línea
  • Navegador Junior
  • Navegador Junior
  • Registered
  • Mensajes: 20
  • Gracias recibidas: 0
Did anyone ever answer you? I have never been able to get attachments to work in my emails.

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Attach a file to Mailback? 7 años 1 mes antes #160134

  • Avatar de tomeperica
  • tomeperica
  • Fuera de línea
  • Usuario está bloqueado
  • Usuario está bloqueado
  • Administrator
  • Mensajes: 6478
  • Gracias recibidas: 674
Hello there,

if you want to attach any file to Mailback, go to your:
Form -> Email element -> Advanced tab -> Mailbackfile
Mailback option must be checked

If you want to attach a PDF to your Mailback then go to:
Your Form -> Advanced tab -> More options -> Mailback emails -> Attachment -> PDF

Note: Please copy the file /media/breezingforms/pdftpl/pdf_attachment.php under the same location and name it FORMNAME_pdf_attachment.php. Replace FORMNAME with the name of your form.

Hope this helps.

Let us know if that worked for you.

Regards
Regards,
Tome
==========================================
Need to renew Pro Support?
Buy Here!
==========================================
Satisfied?
Consider a membership!
==========================================
Like us on Facebook
==========================================
Support Crosstec and get ALL EXTENSIONS and professional support for just $5
Here!

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Attach a file to Mailback? 7 años 1 mes antes #160182

  • Wuzzle
  • Fuera de línea
  • Navegador Junior
  • Navegador Junior
  • Registered
  • Mensajes: 20
  • Gracias recibidas: 0
I have never seen that info about copying a file. Is this a change in recent updates?
I have three forms that would use the same PDF attachment.
Do I need to copy the file three times and name it for the three forms?

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

  • Página:
  • 1
  • 2
Moderadores: ForumSupport
Tiempo de carga de la página: 0.065 segundos

Live Support Chat Opened!

Join our Discord chat here and enter the Crosstec channels to receive live support and talk directly to the team!