Easily send a 4D Write Pro document containing images as the body of an email!
Want to use 4D Write Pro to create HTML emails with static pictures in the text? Maybe something like a fancy newsletter with pictures of the top ten destinations in the world, or simply include your company logo? Wondering how to accomplish this? Wonder no more because with the 4D v18, you can in three simple steps:
- Export your 4D Write Pro document in MIME format,
- use the MAIL Convert from MIME command to transform the MIME into an email object,
- then send it via the SMTP New transporter command.
Legacy charset support with 4D email
If you still need to communicate with old devices that don’t support Unicode, this blog post is for you! Keep reading because with 4D v17 R5, you can send emails in legacy encodings (ISO-2022-JP for Japanese or ISO-8859-1 for Western European).
Customize your email headers
Custom headers are useful to add information that may not be supported with standard properties. In 4D v17 R5, we’re not only giving you a set of predefined headers, but also a way to declare customized headers to the mail object.
Log your SMTP conversations
As promised in a previous post, each R-release includes more advances related to email functionality, unlocking its hidden power.
4D v17 R5 provides an interesting new feature for email logs. Sometimes during development everything works fine but when you deploy to the customer, there’s a problem delivering emails. Discovering where the failure occurs can be difficult, since the communication is encrypted and you often don’t have access to the SMTP server log files. The problem is very likely related to your SMTP server, but how can you be sure? Simply start the SMTP log in your application! This log contains a record of all the actions performed, including those stopping the connection. Even better, this log shows the communications with the SMTP server in plain, non-encrypted text, making it easier to analyze.
A new way to send mails
We know the importance of sending emails and common a task it has become in today’s applications. For example, imagine you’re in a business and you want to send an attractive email based on HTML with a few images or even a video, and attach a file to it (e.g., a purchase order or an invoice). And you want to do all of this with just a few lines of code. Code that is easy to write and understand. Well starting with 4D v17 R4, the previous scenario is now possible. That’s why we’ve enlarged the feature set related to emails.