<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Mail service not success inside docker</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121336926" />
  <subtitle>Mail service not success inside docker</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121336926</id>
  <updated>2026-04-04T15:25:03Z</updated>
  <dc:date>2026-04-04T15:25:03Z</dc:date>
  <entry>
    <title>RE: Mail service not success inside docker</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121338651" />
    <author>
      <name>Olaf Kock</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121338651</id>
    <updated>2022-01-21T14:45:37Z</updated>
    <published>2022-01-21T14:45:36Z</published>
    <summary type="html">&lt;p&gt;What's in the logs? Mail is configured on server level - e.g. the
  account used to send. Both sender as well as the credentials with some
  email provider. If you have configured this on your local machine, but
  not on another server, it won't work where it's unconfigured.&lt;/p&gt;</summary>
    <dc:creator>Olaf Kock</dc:creator>
    <dc:date>2022-01-21T14:45:36Z</dc:date>
  </entry>
  <entry>
    <title>Mail service not success inside docker</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121336925" />
    <author>
      <name>SHAHRUL AZHAR</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121336925</id>
    <updated>2022-01-20T17:38:54Z</updated>
    <published>2022-01-20T00:42:37Z</published>
    <summary type="html">&lt;p&gt;Hello, I'm using liferay 7.4&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;I configure mail property through control panel &amp;gt; system
  administration &amp;gt; mail&lt;/p&gt;
&lt;p&gt;In my local pc in window,  i successfully receive mail. But when I
  put my portlet to server ubuntu (install liferay using docker), I not
  successfully receive the mail. Eventhouh error message also not
  produce inside log&lt;/p&gt;
&lt;p&gt;My code in portlet is in below&lt;/p&gt;
&lt;pre&gt;
&lt;code class="language-java"&gt;private void sendMailMessage(
            ActionRequest actionRequest, ActionResponse actionResponse, String mailFrom, String mailTo, String title, String body)
				throws IOException, PortletException {
				String mailSubject=title;
				String mailBody=body;
				String senderMailAddress=mailFrom;
				String receiverMailAddress=mailTo;
				try {
				            MailMessage mailMessage=new MailMessage();
				            mailMessage.setBody(mailBody);
				            mailMessage.setSubject(mailSubject);
				            mailMessage.setFrom(new InternetAddress(senderMailAddress));
				            mailMessage.setTo(new InternetAddress(receiverMailAddress));
				            MailServiceUtil.sendEmail(mailMessage);
				    // SessionMessages.add((HttpServletRequest) actionRequest.getPortletSession(),&amp;quot;mail-send-success&amp;quot;);
				}
				catch (Exception e) {
				    e.printStackTrace();
				}
	}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;What should I do now so that I can receive mail service successfully. Thanks&lt;/p&gt;</summary>
    <dc:creator>SHAHRUL AZHAR</dc:creator>
    <dc:date>2022-01-20T00:42:37Z</dc:date>
  </entry>
</feed>
