1. DIPANJAN DUTTA
  2. PowerBuilder
  3. Friday, 31 March 2023 06:39 AM UTC

Hello Experts,

Error message received from Gmail when sending email to multiple Gmail recipients  it also indicates that seeing duplicate headers and rejecting the email by Gmail.

To send email we are using SMPT protocol and following objects

  1. n_cst_mailservice
  2. n_cst_winsock
  3. n_cst_smtp (inherited from n_cst_winsock)

 

The data portion of the message look like following when sending a single email address in 2 Gmail account marked in yellow.

From: <dipanjan.dutta.21281@gmail.com>

User-Agent: TopWiz PowerBuilder 17.2 SMTP Object

X-Accept-Language: en-us, en

MIME-Version: 1.0

To: <datta.dipanjan@gmail.com>

To: <duttadipanjan@gmail.com>

Reply-To: <dipanjan.dutta.21281@gmail.com>

Subject: Customer: Your Company Invoice: XXXXXXXXX 3/27/2023 is Attached

Content-Type: multipart/mixed;

 boundary="2AF3270B-5413-43B5-286A-080C00000000"

 

etc…………

 

Could anyone help me on that? Advance thanks for your help.

 

Thanks & Regards

Dipanjan

DIPANJAN DUTTA Accepted Answer Pending Moderation
  1. Thursday, 6 April 2023 04:50 AM UTC
  2. PowerBuilder
  3. # 1

This one is resolve basically the program was adding multiple email recipient in a loop with concatenate 'To :' in following manner

To: <datta.dipanjan@gmail.com>

To: <duttadipanjan@gmail.com>

To: <someone@email.com>.........................To :<xxxxx>

Due to that Gmail throw the error message - "seeing duplicate headers and rejecting the email by Gmail."

Now we remove 'To: ' from Loop and added coma(,) after each recipient, now its look like following

To: <datta.dipanjan@gmail.com>, <duttadipanjan@gmail.com>, <someone@email.com>,........<xxxxx>

and it works properly.

Comment
  1. Andreas Mykonios
  2. Thursday, 6 April 2023 05:48 AM UTC
Hi.

Nothing to do with the main question. But have you considered using BCC instead of TO? It's not a good practice to make "public" your recipients...

Andreas.
  1. Helpful
There are no comments made yet.
DIPANJAN DUTTA Accepted Answer Pending Moderation
  1. Friday, 31 March 2023 07:20 AM UTC
  2. PowerBuilder
  3. # 2

PB version 17 R3, these are some utility object from TopWiz Software using winsock utility we are sending email not PFC objects.
When we send it multiple recipient its showing duplicate headers and reject it

Comment
  1. Miguel Leeuwe
  2. Friday, 31 March 2023 07:39 AM UTC
Are you using the latest version of Topwiz? Roland has done quite some improvements on this, some pretty recent.
  1. Helpful 2
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Friday, 31 March 2023 06:57 AM UTC
  2. PowerBuilder
  3. # 3

Hi,

Which version of Powerbuilder?

Which version of PFC classes? (if you are using PFC, I'm asking because the naming of the objects is typically PFC classes).

regards.

Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.