I want to implement functionality where a user can send me an email from my public page, which i will then read through my CMS (rather than my email client), and optionally respond from there. Once i respond from my CMS, the email is sent to them via PHPMailer
.
I am wondering if it's possible for me to do something to the formatting of the email where i could put my response in the beginning of the email to be displayed as regular text, and then have their original message below it, in a way that their client would recognise and display as what Gmail calls "quoted text" for example, and shows it collapsed by default, and in different colour.
I don't know if those quoted texts in email clients work only locally because their client actually compares the text to previous emails in their inbox, or i can set up some HTML tags to tell their client that this is supposed to be quoted text?
In plain-text email, you show quoted text using >
at the beginning of each quoted line, and you can use more than one level.
In HTML, it would be appropriate to use a blockquote
tag, which again, can be nested.
Overall, if there is some particular style you want, open a message that looks like you want and inspect its HTML source code to see how it’s done.