https://issues.apache.org/bugzilla/show_bug.cgi?id=49267

           Summary: Mail Task: port number will be ignored when using SSL
           Product: Ant
           Version: 1.8.1
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
        AssignedTo: [email protected]
        ReportedBy: [email protected]


When sending mail with SSL, then the standard port for SMTP over SSL will be
used always (465). Any specified port (by:  mailport="xxx")  will be ignored.

Example:

<target name="mailtest">
   <mail   from="[email protected]"
                tolist="[email protected]"
                subject="Test 1"
                message="mail test"
                mailhost="smtp.company.com" 
                user="theusername" password="thepassword"

                mailport="646" ssl="yes" 

                enableStartTLS="no"
                failonerror="true">
        </mail>
</target>

Debug output:

mailtest:
     [mail] Using MIME mail
     [mail] Sending email: Test 1
     [mail] From [email protected]
     [mail] ReplyTo []
     [mail] To [[email protected]]
     [mail] Cc []
     [mail] Bcc []
     [mail] Failed to send email: Could not connect to SMTP host:
smtp.company.com, port: 465
  [antcall] Exiting X:\build.xml.

Reproducable on Solaris, Linux, Windows 
with Ant 1.7.1, 1.8.0, 1.8.1

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to