Hello,
I'm using Oracle 18.2 and Apex 19.1 on a Windows platform. I have an application that generates Emails to a list of my organization's members. The application works fine and most of our members receive their Emails intact. For a few members the Email goes into their spam folder, even after they "whitelist" the sending address. I'm trying to investigate and determine if the HTML Emails are not properly formatted. I have checked the formatting on a site: https://www.htmlemailcheck.com/check/ . Initially the site gave a warning about all the <p> tags that the Apex Rich Text Editor page item produced. I found a posting from https://apex.oracle.com/pls/apex/germancommunities/apexcommunity/tipp/6401/index-en.html that showed how to replace the <p> tags with <br /> tags. By putting the following code in the page item's JavaScript Initialization Code field it eliminated the warning resulting from a plain <p> tag. I'm not strong with JavaScript but this was easy to implement.
function ( configObject )
{
configObject.enterMode = 2;
configObject.uiColor = "#AADC6E";
configObject.resize_enabled = false;
return configObject;
}
I still get a few warnings when I include an image in the body of the Email. Here's a de-identified sample of the HTML data that was sent to UTL_SMTP..WRITE_DATA:
Date: 11-OCT-2019 11:10:30
To: member_address@hotmail.com
From: sender_address@my_domain.org
Subject: Test6
Reply-To: sender_address@my_domain.org
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="a1b2c3d4e3f2g1"
--a1b2c3d4e3f2g1
Content-Type: text/html; charset="UTF-8"
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>Mail from My Organization Name</title>
</head>
<body>
This is line 1 before the first image.<br />
This is line 2 before the first image.<br />
<img src="http://www.my_domain.org/email_images/image_2410_1.jpg" alt=image_2410_1.jpg"/><br />
This is line 3 after the first image.<br />
This is line 4 before the second image.<br />
<img src="http://www.my_domain.org/email_images/image_2410_2.jpg" alt=image_2410_2.jpg"/><br />
This is line 5 after the second image.<br />
</body>
</html>
The <img> tags produce a warning in the verify-er. From what I read about HTML Email messages, many problems are avoided by putting all lines within the <body> tags into an HTML table. Instead of <br /> tags, the output of each line would be in individual rows of the table. Is it possible to configure the APEX Rich Text Editor to produce the output as an HTML Table, making it more HTML Email friendly? Also, is it possible to add "style" information into a <table>, <div>, <img> or <p> tag that the Rich Text Editor produces?
Thanks for checking.