Bug 64792 - [Mail Task].[nested elements].[to].[name attribute] of first to element is setting for other(s).
Summary: [Mail Task].[nested elements].[to].[name attribute] of first to element is se...
Status: RESOLVED WORKSFORME
Alias: None
Product: Ant
Classification: Unclassified
Component: Core (show other bugs)
Version: 1.10.8
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: Ant Notifications List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-10-06 21:11 UTC by babakarya09
Modified: 2021-08-13 07:30 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description babakarya09 2020-10-06 21:11:14 UTC
When I set a name for multiple to element I got first elements name for other element.
for example:
<mail mailhost="smtp.gmail.com" 
      user="sender@gmail.com" 
      password="pass" ssl="true" 
      mailport="465" 
      subject="Test Gmail"
      charset="utf-8">

        <from  name="Sender" address="sender@gmail.com"/>
        <to name="receiver 1" address="receiver-1@yahoo.com"/>
        <to name="receiver 2" address="receiver-2@outlook.com"/>
        <header name="header name" value="header value"/>
        <message>The nightly build has completed</message>

</mail>

I got (To: receiver 1) for receiver-2@outlook.com in mail name.
Comment 1 Jaikiran Pai 2020-11-21 04:40:41 UTC
Hello  babakarya09,

Would it be possible to attach us the "raw" mail content that you received?
Comment 2 Jaikiran Pai 2020-11-21 04:44:10 UTC
If possible, please also attach the verbose logs from your ant build, which you can do by passing ant the "-v" option when you launch it.
Comment 3 Stefan Bodewig 2020-12-06 10:55:52 UTC
I've just tried you setup with the Apache mailserver (using STARTTLS rather than ssl directly) with two recipients and it worked. So I doubt this is a bug within Ant o JavaMail and rather a problem with your GMail setup.