PHPMailer HTML e-mail gets quoted - phpmailer

I'm sending HTML mails through PHPMailer to my Gmail account (Inbox app), but I cannot build a body which wouldn't get quoted
(you get new e-mail and all there is is "..." which you click and rest of the mail shows, it's for hiding previous conversation if you Reply).
I have tried including tags, but as soon as I add <br> or <p>, it all gets quoted.
Best I could make work was
$message = "<html><body><p>Lalalala</p> trololo </body></html>"
which resulted in Lalalaa "...", if I add paragraph around trololo, all I get is "..."
Anybody came accross this?

After very deterministic experience (one mails sent 2x got quoted differently each time), the thing that helped was wrapping the entire mail in <span> tags.

Related

How can i send email with Voting buttons via shell script?

I have an existing email chaser system based on linux where we send emails to a large list of individual asking to reply on email with their confirmation and they can reply with options like a1,a2,a3,a4 or a5 which is working ok but teh percentage of response we are receiving is less so to make it more easy for them we would like to add clickable features like Voting buttons, can someone help me in this please?
I know how to do it in vbscript but not sure if linux can do it and I cant find any solution in forums yet, we have limitations which prevent us using any third party tools so we have to use Linux inbuild modules.
If voting is not possible then at-least can generate some clickable links when they click it will generate a corresponding response in subject line which we can grab late by some other process.
thanks in advance.
not sure about voting, but you could simply send html email with clickable links etc as below:
cat <<EOF | sendmail -t
To: someone#mail.com
Subject: A subject
From: A sender
MIME-Version: 1.0
Content-Type: text/html
<html>
<body>
GOOGLE
</body>
</html>
EOF

How can I loop SOLines in MailSettings email Body for Acumatica ReportDesigner

Our customers would like us to include fields from the SO Lines in our Sales Order confirmation email, which we are making available to be sent as part of the MailSettings Body for the Sales Order Confirmation report created through ReportDesigner.
Hypothetically, we are able to loop SO Lines like this for an Email Notification by using a foreach loop in the HTML, but I have been unsuccessful with this approach. (The GUI insists on translating my <> symbols into the ascii codes when I try save the directly edited HTML.)
I do not see a way of doing this at all in the MailSettings Body. How can I loop the data here?
EDIT: I found the instructions for linking to the email notification template from within the report so I can use one for both, so if anyone can help solve the mystery of using the within the Email Notification HTML without it automatically replacing the <> characters with ascii that will also solve my problem.
I used html comments to get <foreach> to work correctly inside of a table:
<table>
<!-- <foreach view="Transactions"> -->
<tr><td>Column 1</td><td>Column 2</td></tr>
<!-- </foreach> -->
</table>
I was able to solve this using the Notification Template; my error was in trying to do the loop in the HTML code instead of pasting directly into the Visual page. Functionality is quite limited in terms of being able to add headers for the table outside of the loop, but I got it working by adding another table outside the loop and setting width percentages for both tables. Ugly, but functional.

PHPMailer: How to allow empty message body

I use PHPMailer to send email to a hp printer (ENVY 5644) which will print whatever the body contain and any attachments. This works, however, I would like to send it body-less since only the pdf attachment is of any interest. The body is just waste of paper. I know it is suggested in other treads that one could just put a single space character in the body and it will look empty but the printer will spit out an empty paper anyway. If I send an email from Thunderbird where I write nothing inside the body, not even a single space but only add an attachment, I do not wast any paper when printing. Only the attachment is printed.
I know, I can just put the paper back into the tray but it would be more nifty if I did not have to.
Any solution?
It looks like your looking for the flag $mail->AllowEmpty = true; - just check the source code

Mail markup: google tester- ok, my server- bad

I have the problem with google mail markup
https://developers.google.com/gmail/markup/overview#gmail_actions
I tried Json-Ld and Microdata. But i have nothing. When i try to send me mail from google tester https://script.google.com/ - everything is ok and i get the letter with quick button. But when i send the same letter from my server- i get letter without quick button. At my server i tryed to change mail's charset, encoding, i tryed to use php function mail and PHPmailer script (yii)- the result is the same.
What should i see the next
Thank everybody for answers. lol
But i found that i should add me to wite list at google here
https://developers.google.com/gmail/markup/registering-with-google
Writers from google didn't mention about it at first part of instruction

Why does NotesDocument.send() insert "!\n " into HTML MIME body?

I'm using NotesDocument.send() to send HTML mails. With server-side javascript, the HTML code (html) is added to the NotesDocument (doc) as follows:
session.setConvertMime(false);
...
var mimeBody:NotesMIMEEntity=doc.createMIMEEntity("Body");
var stream:NotesStream=session.createStream();
stream.writeText(html);
mimeBody.setContentFromText(stream,"text/html;charset=\"UTF-8\"",NotesMIMEEntity.ENC_NONE);
Sending the document works, but if the length of the HTML content exceeds a certain size, the resulting mail contains the string "!\n " at multiple positions. I thought there might be a problem with the MIME conversion and added "MailConvertMimeOnTransfer=0" to the notes.ini. Unfortunately, this didn't help.
Does anyone know how to solve this problem?
PS: I also tried using Mark Leusink's HTMLMail class from OpenNTF (http://openntf.org/XSnippets.nsf/snippet.xsp?id=create-html-mails-in-ssjs-using-mime), but I also faced the problem described above.
UPDATE:
The problem only occurs with mails sent to internet users. Notes users recieve the correct HTML mail.
The problem can be solved by altering the encoding of the MIME entity. I just changed the encoding from NotesMIMEEntity.ENC_NONE to NotesMIMEEntity.ENC_IDENTITY_8BIT, and now the "!\n " strings a no longer inserted into to mail body when executing NotesDocument.send().
All the credit is due to stwissel who provided this solution.

Resources