Home › Forums › Quform WordPress › Put the email output as mail attachment
- This topic has 7 replies, 2 voices, and was last updated 5 years, 12 months ago by sdus.
- AuthorPosts
- February 20, 2018 at 8:08 am #24404sdusParticipant
Dear forum,
I have designed my notification mail in version 2.Now I need the same content (from the html mail) as attachment (e.g. txtfile). So, that the mail come as mail AND attachment.
How I can do this?
MANY thanks!
February 23, 2018 at 10:22 am #24436AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
February 23, 2018 at 12:26 pm #24439sdusParticipantHi Ally,
many many many THANKS!How is the solution, is I have more than 1 form? It means, that this works for all forms which I have.
But only the correct (choosen form at the moment) forms is sending.
Than I must copy and paste this code and set the correct ID?THANKS again!
February 26, 2018 at 5:09 pm #24476AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
March 29, 2018 at 2:53 pm #24829sdusParticipantDear forum,
how I can save the output of the form into the file as uft-16le?
Is it possible?Many thanks for all answers!!!
- This reply was modified 6 years ago by sdus.
April 2, 2018 at 11:23 pm #24864AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
April 3, 2018 at 12:44 pm #24875sdusParticipantHi Ally,
many thanks!
The utf-16le is bad, because it does not solve my problem. I thought it solves my problem:In the mail all german umlauts / characters (ä,ö,ü) are correct. The code from reply 24476 works fine, but all special charakters / umlauts are bad: ( ü=ü ) in the file (shown via hex-editor). Only the file, not the mail.
The file attachment.txt get the unitext from the mailbody. in the utf-16 now Im missing the first 2 bytes (see picture)
Which code I must add to reply 24476 (above), that I get the correct letters in the file and the hex-editor (implicit utf-8) or add the 2 bytes to utf-16?
Many, many thanks for all the fine help!!!!!!!!!!!!!!!!!!!
- This reply was modified 5 years, 12 months ago by sdus.
- This reply was modified 5 years, 12 months ago by sdus.
- This reply was modified 5 years, 12 months ago by sdus.
- This reply was modified 5 years, 12 months ago by sdus.
- This reply was modified 5 years, 12 months ago by sdus.
- This reply was modified 5 years, 12 months ago by sdus.
Attachments:
You must be logged in to view attached files.April 3, 2018 at 9:56 pm #24884sdusParticipantProblem solved.
I must use
add_action('quform_pre_send_notification', function (PHPMailer $mailer, Quform_Notification $notification, Quform_Form $form) {
$mailer->addStringAttachment(iconv('UTF-8', 'UTF-16', $mailer->Body), 'attachment.txt');
}, 10, 3);
to get the output with BOM.
Thanks for the perfect support!!!!!!
- AuthorPosts
- You must be logged in to reply to this topic.