lespritdelescalier
Registered User.
- Local time
- Yesterday, 22:54
- Joined
- Mar 16, 2015
- Messages
- 50
Hello!
I have created a small application which generates PDF invoices and emails them to our customers. In many cases, these customers have a system on the other end which accepts the PDF and enters it in to their AP system.
We send invoices to about 150 customers a day, and most report no issues at all (and the invoices get paid ). With several customers, we've had responses that the emails we send include two attachments: the PDF invoice, and a file named ATT00001.bin (or htm, or something else).
In my past experience, I've seen this happen mostly with MS Exchange when receiving an email from a google mail server, however, I'm sure it can happen with other combinations of mail servers as well. My company is using a google mail server to send its email, but I am not sure what systems our customers are using. Most of the people I have contact with at these other companies are ones in the finance department.
I did a little searching on this issue, and found two things. This issue can happen when:
- there are non-ASCII characters in the email message
- the attachment is added to the email before the text
I can confirm there are no non-ASCII characters in the email - the email body is a string, and it is literally one sentence long. In my code, I have created the text portion of the email prior to creating the attachment, but I am not sure if Access changes the order.
I am creating the email using the following code:
and assigning the properties of objEmail using the following: (I've left out some of the other properties, as they are all assigned the same way)
Any help with this issue would be appreciated!
I have created a small application which generates PDF invoices and emails them to our customers. In many cases, these customers have a system on the other end which accepts the PDF and enters it in to their AP system.
We send invoices to about 150 customers a day, and most report no issues at all (and the invoices get paid ). With several customers, we've had responses that the emails we send include two attachments: the PDF invoice, and a file named ATT00001.bin (or htm, or something else).
In my past experience, I've seen this happen mostly with MS Exchange when receiving an email from a google mail server, however, I'm sure it can happen with other combinations of mail servers as well. My company is using a google mail server to send its email, but I am not sure what systems our customers are using. Most of the people I have contact with at these other companies are ones in the finance department.
I did a little searching on this issue, and found two things. This issue can happen when:
- there are non-ASCII characters in the email message
- the attachment is added to the email before the text
I can confirm there are no non-ASCII characters in the email - the email body is a string, and it is literally one sentence long. In my code, I have created the text portion of the email prior to creating the attachment, but I am not sure if Access changes the order.
I am creating the email using the following code:
Code:
Set objEmail = CreateObject("CDO.Message")
and assigning the properties of objEmail using the following: (I've left out some of the other properties, as they are all assigned the same way)
Code:
objEmail.Textbody = sMessage
objEmail.AddAttachment sAttach
Any help with this issue would be appreciated!