Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.2
-
None
-
linux
Description
I tooked original sample code and it worked fine. So I modified the text, set the encoding and ran it again - but the received email had each mime part twice.
HtmlEmail email = new HtmlEmail();
email.setHostName("smtp");
email.addTo("leos.literak@aaa", "Leos");
email.setFrom("leos.literak@aaa", "Me");
email.setSubject("Test email with inline image");
URL url = new URL("http://www.abclinuxu.cz/images/clanky/watzke/unixove-nastroje-logo.png");
String cid = email.embed(url, "Apache logo");
email.setCharset("UTF-8");
email.setHtmlMsg("<html>žluťoučký kůň - <img src=\"cid:" + cid + "\"></html>");
email.setTextMsg("žluťoučký kůň");
Subject: Test email with inline image
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_Part_0_17764792.1265348415830"
------=_Part_0_17764792.1265348415830
Content-Type: multipart/related;
boundary="----=_Part_3_12227392.1265348415896"
------=_Part_3_12227392.1265348415896
Content-Type: multipart/alternative;
boundary="----=_Part_4_18450577.1265348415896"
------=_Part_4_18450577.1265348415896
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: base64
xb5sdcWlb3XEjWvDvSBrxa/FiA==
------=_Part_4_18450577.1265348415896
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<html>=C5=BElu=C5=A5ou=C4=8Dk=C3=BD k=C5=AF=C5=88 - <img src=3D"cid:wddstqa=
bqx"></html>
-----=_Part_4_18450577.1265348415896-
------=_Part_3_12227392.1265348415896
Content-Type: image/png; name="Apache logo"
Content-Transfer-Encoding: base64
Content-Disposition: inline; filename="Apache logo"
Content-ID: <wddstqabqx>
iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz
AAAG7AAABuwBHnU4NQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAe7SURB
8csx12N60dP8NOIs8p6J+bS/hDjnMVyHWFVhAsgxj4I6fgsgJjch1pP2qVyhvxtMe1awQGUXwf/L
0ain9RibfyUJgOMcYg75ZgtQ0l8EKhtc5pkF8NJCFPF/AbzM8B8Xxxza+PCJaQAAAABJRU5ErkJg
gg==
-----=_Part_3_12227392.1265348415896-
------=_Part_0_17764792.1265348415830
Content-Type: multipart/related;
boundary="----=_Part_1_16675983.1265348415831"
------=_Part_1_16675983.1265348415831
Content-Type: multipart/alternative;
boundary="----=_Part_2_26644003.1265348415831"
------=_Part_2_26644003.1265348415831
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: base64
xb5sdcWlb3XEjWvDvSBrxa/FiA==
------=_Part_2_26644003.1265348415831
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<html>=C5=BElu=C5=A5ou=C4=8Dk=C3=BD k=C5=AF=C5=88 - <img src=3D"cid:wddstqa=
bqx"></html>
-----=_Part_2_26644003.1265348415831-
------=_Part_1_16675983.1265348415831
Content-Type: image/png; name="Apache logo"
Content-Transfer-Encoding: base64
Content-Disposition: inline; filename="Apache logo"
Content-ID: <wddstqabqx>
iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz
AAAG7AAABuwBHnU4NQAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAe7SURB
0ain9RibfyUJgOMcYg75ZgtQ0l8EKhtc5pkF8NJCFPF/AbzM8B8Xxxza+PCJaQAAAABJRU5ErkJg
gg==
-----=_Part_1_16675983.1265348415831-
-----=_Part_0_17764792.1265348415830-
This is a blocker for me. I would be gratefull, if you could fix it today, otherwise I will have to abandon this library and implement its functionality myself. Thanks in advance.