Backendless is send a mail three times

Hello,

I have some emails running with a template, but since recent days i am receiving the email three times for each email send.

Even when i send a testmail i am receiving it three times.

What can cause this?

Could you please show how you send out emails using templates?

Hi Mark,

See below:

Try adding the “print” block to log the addresses and cc values and make sure there are no duplicate email addresses there. When using the “print” block, the output will be displayed in browser’s “Console” window (in devtools).

Hi Mark,

It shows only one email in the console with the print block. Strange thing is that now i receive four mails instead of three.

Even when i change the email adress to text, it remains the same image

Did you log both addresses and cc ?

Yes, both log correctly, 1 single email each.

Hello @Michel_Loriaux

Please specify, do you specify the same email address in addresses and cc?

Please provide your applicationId.

Hello Vladimir,

No both email adresses are different, this is my application ID:
30960D18-DC9C-C94C-FFD9-AECB1619B200

Can it have something to do with my custom domain?
Because before the change of custom domain it was working correcty.

Hi, @Michel_Loriaux

Thank you for providing your APP Id, you have already created a lot of pages and logic in the BL section which makes it difficult to find the right one for us to identify the problem. Please specify the page in the UI-builder or BL-handler (if it is) where the issue is occurring. The more information you can give us, the faster we can find out what your problem is.

Regards,
Marina

Hi @Marina.Rudenko,

The pages which contain the email blocks that send 4 emails are in these pages in the UI builder:
-mijngegevensgv
-vrijwilligermijngegevens
-startconsult
-pltoestemmingen
-plmaandcontrole

I tested the forgot password by link and that is sending one mail correctly.

Hello @Michel_Loriaux

Sorry for the long response.

I am looking into your logic, but very hard to find one place where everything breaks.

Could you please create one new page, where you reproduce this problem but without all unneeded things like your business logic, only email sending.

In case if it reproduces we can decide from where it’s coming - logic, or our side.

If it is logic - you should copy one of the pages where it’s reproduced, and step by step delete all things that are not related to sending emails, that’s may help us to realize where the problem is located and makes next tries to fix it.

We are really want to help solve your issue, but that requires your bits of help.

Regards, Dima

1 Like

It will definitely help to have a simple page that does nothing but sending an email by template. Knowing whether that works for you as expected would be great help.

Additionally, you can try the following: login to gmail.com using the same account you configured in Backendless (Manage > App Settings > Email). Once you login to gmail, switch to the “Sent mail” folder and see if the emails sent from Backendless appear twice or only once. If you seem them showing up twice, it means we sent them more than once, otherwise (if there is only one email), it would mean that Backendless did its job correctly.

Regards,
Mark

1 Like

Hi @Dima_Vak , @mark-piller,

Thanks for your support , i have made a simple testemail but then i still had 4 emails. In the Sent mail folder there were 4 emails.
But i think i found the cause of the problem, the emailblocks who did not work have the email directly in a text block:
image

I first used the business info@ mailadress ,now i tested with a gmail address and now it is back to working normal, so i think there is something wrong with my email provider or something. No idea what.

1 Like

Hello @Dima_Vak , @mark-piller,

I found out that when i have 4 of the same emails in the Users table, the email will be send 4 times.
Even though i am sending the mail to only one of the users.

When i change the other three email adresses then i will only receive one email.
Could you please look into this issue?

Do you retrieve user accounts from the database to pass them into the addresses connector in Codeless?

When a user is creating a dossier, the email is stored in a table.
I then take this value and use it in the addresses connector in codeless:

image

Have you added logging to see what Get property "email" of Page Data returns?

Yes it gives the exact email address in return.

The implementation of the block that sends an email for a template is not connected to the accounts in the Users table. The only possibility for multiple emails is one of the following:

  1. duplicate email addresses are passed into the addresses connector
    or
  2. the logic is executed multiple times.