I am trying sending HTML e-mails using MAPI calls in my Delphi Application.
When the client is Thunderbird if works fine. But when the client is Microsoft Outlook or Outlook Express I need to save the HTML code in a file and send it as the first attachment of my message, elsewhere the mail client interpret the HTML as text, showing the tags.
Sending HTML as the first attachment works only when no more attachments are sent, because if I send one or more attachments the first (HTML) is also showed as an attachment.
Does somebody can help me?
Thanks in advance.
Douglas.
Message OK:
Ok http://www.freeimagehosting.net/uploads/e51dfa52f4.jpg
Bad Message (with one attachment):
Bad http://www.freeimagehosting.net/uploads/7e5689e2b9.jpg
If you find that Outlook/OutlookExpress can not handle HTML natively, it might just be that you are using a version of Outlook that isn't capable of, or isn't configured to default to HTML rich content by default. Have you tried reconfiguring your Outlook/OutlookExpress options to select HTML rich text by default?
It looks like it's actually working, but that Outlook does not display things correctly. An HTML email sent via a traditional email client, is actually mime-encoded, just as it shows there. In other words, you may find that if the email is sent, it appears fine on the other side, it's just a bug in outlook-express that you don't see the MIME attached content in the window, instead you see it as it is truly done internally, as a MIME encoded attachment.
Related
How do I send HTML content from OneDrive Graph Api /sendMail endpoint? I have tried various permutations of HTML and encoded HTML in the body but I never receive HTML in the actual email.
-- Edit --
It turns out my problem is actually Outlook Online stripping unsafe HTML. If I include a link to Bing.com that gets stripped, if I include a link copied from one of my automated Teams emails that does not get stripped.
I have trawled the Office 365 Security and Compliance but found nothing to flag specific domains as safe.
If anyone knows how to mark domains as safe, or some other solution that would be great.
I have a Chrome extension which adds new functionalities to the Gmail interface.
I'm trying to create email "templates" which have a default header, footer and signature (using html, images & css). I want to open these templates in order to edit and send them, just filling the actual content of the email.
I was wondering if there is any way to open these emails directly into the Gmail Compose Window or something like that. Maybe there is a parameter to do this using the URL, like: https://mail.google.com/mail/?view=cm&fs=1&id=xxxxxxx.
I've tried loading the template using the body parameter, but it seems that it doesn't support html.
Any ideas?
Finally, I've found a way to open a mail directly into the "Compose" Window, ready to be edited and sent. It's so simple that I can not believe it takes me 2 days to figure it out:
Just use the url:
https://mail.google.com/mail/u/[accountNumber]/?zx=#[tag]?compose=[MailID]
accountNumber is useful if you have two or more accounts at the same time
tag its the mail list that you want to see behind the compose window (ussually inbox).
MailId ... well, the Gmail Message ID.
For instance, https://mail.google.com/mail/u/0/?zx=#inbox?compose=14bbb0dae14fec1f will open the inbox of your first account with a Compose Window opened and pre-populated with the e-mail data.
There is already a feature called "canned Response" in current gmail compose window which is probably solving the same problem that you are trying to solve with your extension.
well I am not sure URL has html support or not but I think it should not support it to protect user from cross-site scripting attacks.
you can also consider Gmail rest API if you want to compose gmail message with your own custom template but using this you may have to do lots of things from scratch.
I am currently using Grails Mail 1.0 plugin in my project. I used it to send verification link to registrant's email address. Unfortunately, the sent verification link is not clickable on some webmail services like hotmail and yahoo mail. I have also encountered same problem with other web browsers like mozilla and google chrome. Is this really a bug on the said plugin? Please help!
Is this really a bug on the said plugin?
Almost certainly not. I use the same plugin to send HTML emails and they render fine in Yahoo mail.
In general, you shouldn't rely on links in HTML email being rendered correctly, because some email programs may be configured to only read emails in plain text format. Also, the rendering of HTML content varies wildly from one email program to another.
For these reasons, you should generally provide a plain-text fallback, e.g.
To register, click here. If you're using
a rubbish email program, you won't be able to click the link, so
copy-paste the following link into your browser's address bar:
http://www.example.org
I would like to send a POST request to a server, I don't want to use GET because the sent message could potentially get very long. I was thinking about using javascript and jquery, but I believe most clients have javascript turned off. Is there another way to send a Post request from within an email?
Yea, I've been unable to use javascript, but does anyone else know of a way to make a post request within an outlook mail message?
Probably not. Most javascript is disabled in emails for security purposes so I highly doubt you'll be able to use any server side code via a supported email client like Outlook. I could be wrong though...
How about using a form with hidden inputs for your parameters
I am making an application in Delphi 7 and I need to send an email using PageProducer component in order to make it in HTML format. At this point, the objective is to send the email in both formats: text/plain and text/html, but really know how to send it in only one format: either text/plain or text/html. So, how to send an email using PageProducer in both formats: plain and HTML??
I need that because there are webmail servers that don't accept HTML emails.
PageProducer is just a component for producing HTML content by replacing some tags with your specified content. It has no feature for sending emails.
To send email in Delphi 7, you can use IdSMTP component from Indy Clients tab in Components Palette. As it is clear from its name, this component uses SMTP protocol for sending emails.
In your case, you should first generate HTML content using either PageProducer or any other method, and then pass the HTML content to IdSMTP to be sent as an email.
To send an email in both plain text and HTML format you should use multi-part message. You can refer to Indy help for TIdMessage class.
Regards
You should take a look at the MIME format. This is the format the email is finally sent.
If you understand it you will be able to send Multipart messgaes containing text/plain text/html or attachments.
http://en.wikipedia.org/wiki/MIME