Toad World® Forums

Automation script - send email action, problem with email addresses that contain apostrophes


#1

I am running an automation script daily, and have not any problems with it. I then added a bunch of new email addresses, and there happened to be 2 in the list with apostrophes. The email was triggered, but the distribution list got cut off after the first email with an apostrophe (it was included, but the next address in the list was not). I then found an alternate email for 1 person, and I put the other address at the end of the list and my test email worked. Does anyone know if there is a way to send to multiple email addresses with apostophes?


#2

No, not sure how that will work. I created QAT-2491 to look into to it. Can you copy and paste the email addresses for me? You can take off the domain. I just need an example that produces the problem.


#3

Linda.O’Connor@xxx.com; Chris.d’Amico@xxx.com - so only the first email would go through, and anything after the first address would be cut off.


#4

Thanks. That info is helpful. I added to QAT-2491.


#5

Hello,

I’m following up on this issue - I encountered the same problem with TDP 3.4. Was it fixed in a newer version, or is there a workaround?


#6

Apostrophy’s in any kind of sql will cause problems as it is the start and end of a string literal. Sometimes you need to use three in a row (’’’) or 4 *(’’’’) if it is all by itself in oder to get the ’ treated as a ’ instead of an end of string marker. Other places you need to use an escape character like ’ so the \ tells it to take the next character as is an not interpret it.


#7

This is fixed in our TDP 3.6 version. Please upgrade to this version.


#8

I know this is a very old thread, but I’m encountering the same issue. I see a previous comment that this was fixed in TDP 3.6, but I’m running TDP 4.0.0.624, and it is still an issue when attempting to send emails to apostrophe-emails through an Exchange server.

To add a little more detail: As part of an automated report, there is a list of names in the To: field, two of which contained apostrophes, which looked something like this:

To: [Multiple Addresses 1]; Name.O’LastName1@x.com; [Multiple Addresses 2]; Name.O’LastName2@x.com; [Multiple Addresses 3];

It was a pretty straightforward list of addresses, all semicolon-separated, with two apostrophe names contained somewhere in the middle. However, when investigating the header of the email that was sent, it ended up looking a little different:

To: [Multiple Addresses 1]; “[Multiple Addresses 2]; Name.O’LastName2@x.com” Name.O’LastName1@x.com

That is, everything from after the first apostrophe-email up to and including the second apostrophe-email are treated as a single alias for the address of the first apostrophe-name. Anything after the second apostrophe-email is dropped. I’ve tried a few methods to force recognition of these email addresses, like converting them to “Name O’LastName1” Name.O’LastName1@x.com; “Name O’LastName2” Name.O’LastName2@x.com; but the best I can manage is to send the email to one of the two users, with the alias corresponding to the correct email address.

Is there any way in Toad Data Point to escape these apostrophes or otherwise force it to recognize each address as an address (encapsulating in <> doesn’t work, but perhaps something else would)? Any assistance would be much appreciated!


#9

You are right it is not working with email names with apostrophe. We probably fixed it and then broke it again. I reopened QAT-2491 to fix in TDP 5.0