MHT sending mail with Indy - delphi

My question is how to send a mht message throw Indy 9 with Delphi 7 IDE?
Thanks in advance!

MHT is a format for saving an HTML document and associated resources into a single file. To send such a document as an email, you would have to extract the HTML and resource data first and put them into a TIdMessage component like other HTML-formatted email. There are articles on Indy's website for how to send HTML emails with Indy.
Have a look at RFC 2557 for how MHTML interacts with email.

Related

Outlook Rest API: Download the email attachments of type .eml files using outlook rest API

I followed this documentation to download the attachments of email.
Below is the API response.
If email attachment type is FileAttachment, I am able to get the file content in api response and able to save the attachment.
If email attachment type is ItemAttachment, I am not able to get the file content in api response. When I googled for it, I found this stack overflow question. I used the rest API mentioned in the answer. But it's giving itemAttachment content in html format. And if that ItemAttachment has any fileattachment in it, then I am unable to access it.
Is there any API available to download the itemAttachment as .eml file not as html?
Any suggestion/answers would be more than welcome.
I assume by .eml you mean you'd like to retrieve the email in MIME format?
Retrieving an email's raw MIME content isn't supported by Microsoft Graph API at this time. This has been a common request and there is an existing UserVoice request for it.
If this is a hard requirement for your scenario, you may want to take a look at Exchange Web Services (EWS). The Message object returned by EWS includes a MimeContent property.
This is now supported on https://outlook.office365.com/api/v2.0/me/messages/<Message-Id>/$value endpoint

Forward and reply email using DELPHI and INDY 10 components

Does Indy component suite offers any functions or support or e mail forewarding or reply to ... processing.
I expect the mail body is extended with the sending params. Using other mail programs sometimes the mail text is changed the the > character for each line.
You use TIdPOP3 or TIdIMAP4 to receive emails, and TIdSMTP to send emails. Replying/Forwarding is just a matter of downloading a TIdMessage via POP3/IMAP, updating its Recipients, Subject, etc as needed, and then sending it with SMTP.

Send form data and generated pdf from orbeon to web service

Is it possible to setup Orbeon Forms to send data entered in form and pdf to another site or web service? I tried using workflow-send button as described in http://wiki.orbeon.com/forms/doc/developer-guide/configuration-properties/configuration-properties-form-runner#TOC-Workflow-send-button, but it in this case only xml data or pdf is send to success page.
Is there any other way to get data entered by user and generated PDF to another web application? I am new to this area, so it's possible that I missed something obvious in documentation.
You are right: when using the workflow send button and a POST or PUT, either a URL pointing to the PDF or the XML document is sent to the success or error page. However, the document id is also sent as the document request parameter. So I would:
Set the properties to have the PDF generated, so the PDF is sent in the POST or PUT.
In the target page, retrieve the PDF from the URL, and the XML from the persistence layer, using the document id provided to you in the document request parameter.
Sending the document as a request parameter was implemented after the 3.9 release, so you'll need to use Orbeon Forms 4.0 or newer (as of this writing you can use 4.0 M6).

Problem sending HTML Mails using MAPI and Outlook

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.

How to send an email using PageProducer in Delphi 7?

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

Resources