Affixa V3.2014.08.13 Gmail Error 400 With Multiple To or Cc recipients

76 views
Skip to first unread message

Brian Seymour

unread,
Aug 20, 2014, 10:49:26 AM8/20/14
to affixa-...@googlegroups.com
I have developed an application which uses MAPI to create an email on Gmail via Affixa, it was working fine on V3.2014.05.14.

I had uninstalled Affixa to work on other projects and today I installed Affixa V3.2014.08.13 and now, when I run my application with multiple To or Cc recipients, I get the error "The remote server returned an error: (400) Bad Request." which appears once the "Creating your message.." progress bar is filled.

To clarify, the emails are generated when there is only one recipient in either (or both) the To and Cc addresses but not not when there is more than one recipient in either the To or Cc address fields.

Has anyone else had this problem and if so know how I can resolve it?

Thanks in advance.
Affixa multiple recipient error.png

Chris Wood

unread,
Aug 20, 2014, 11:10:22 AM8/20/14
to affixa-...@googlegroups.com
Hi Brian,

How Affixa works under the hood has changed a bit in the latest version to use Gmail’s new API.

Can you let me know how your code is setting the recipient lines? I.e. what should it look like? E.g.

To: Bob Jones <b...@jones.com>

or 


or


or

To: Jones, Bob <b...@jones.com>

etc..

Thanks!

Chris

Brian Seymour

unread,
Aug 20, 2014, 11:44:07 AM8/20/14
to affixa-...@googlegroups.com
Hello Chris

An example of an email which we previously generated successfully is shown in the attachment.

The code to generate the email is written in VB6 and uses the "Microsoft MAPI Controls". Each address is individually added to a collection of addresses with the code shown below.

With mpmMessage
   For iArrayIndex = LBound(strToAddress) To UBound(strToAddress)
         If .RecipCount > 0 Then
            .RecipIndex = .RecipCount
         End If
         .RecipAddress = "sm...@jones.com"
         .RecipDisplayName = "sm...@jones.com"
         .RecipType = mapToList
   Next
   For iArrayIndex = LBound(strCCAddress) To UBound(strCCAddress)
         If .RecipCount > 0 Then
            .RecipIndex = .RecipCount
         End If
         .RecipAddress = "sm...@jones.com"
         .RecipDisplayName = "sm...@jones.com"
         .RecipType = mapCcList
      End If
   Next
   .ResolveName
End With

Thanks.

Affixa multiple recipient sent email.png

Chris Wood

unread,
Aug 20, 2014, 1:07:06 PM8/20/14
to affixa-...@googlegroups.com
Thanks Brian - just sent an email to you to follow this up.

Will post back here if it shows up any problems.

Chris

Chris Wood

unread,
Aug 21, 2014, 4:54:49 AM8/21/14
to affixa-...@googlegroups.com
Hi there,

Brian and I worked together to debug what he was seeing whereby an error occurred if more than one recipient was specified on a "to" line.

It turns out that this is related to a problem with the Gmail API itself rather than Affixa. For those of a technical background, here's the detail:


Hopefully this should just magically start working again very soon when the Gmail people fix it on their side.

All the best,

Chris
Reply all
Reply to author
Forward
0 new messages