Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
sending event email
#4
(08-28-2019, 02:30 PM)ccMcBride Wrote: my smtp settings (this works with all other emails)

I see a few issues with that setup.

- Why are you setting a password only if SSL is used? Even if you don't use SSL to encrypt the connection, you can still login securely by using satSASL instead of atDefault, and then populating the TIdSMTP.SASLMechanism with secure SASLs like CRAM-SHA1, CRAM-MD5, etc.

- I don't suggest using the TIdSSLIOHandlerSocketOpenSSL.SSLOptions.Method property at all. You should be using the TIdSSLIOHandlerSocketOpenSSL.SSLOptions.SSLVersions property instead so that you can support multiple TLS versions at a time (ie TLS 1.0, 1.1, and 1.2). Not all servers support the latest TLS 1.2 yet, or are limited to a single version. And why is your assignment of SMTP.UseTLS dependent on whether you are using TLS 1.2 or not? Those are two independent settings, so you should be treating them separately in your config.

- you are populating emMessage.From from your config, and then you are overwriting it with emMessage.ReplyTo from a different config.

(08-28-2019, 02:30 PM)ccMcBride Wrote: I changed the main message part to multipart/mixed, still error.
as test, I also did the following:
...
it was sent with no errors, the event was attached as an ICS file, no 'accept/decline' on email
...

Your emails are still malformed. There are clearly multiple MIME parts present, despite your claim that the code logic for that is commented out. So clearly you have some left-over data in the TIdMessage, or you are not showing all of the code you are actually using to populate the TIdMessage. Either way, when multiple MIME parts are present, the top-level 'Content-Type' header MUST MUST MUST be a 'multipart/...' media type, like 'multipart/mixed'. So, either:

- populate ONLY the TIdMessage.Body and leave the TIdMessage.MessageParts empty, and set the TIdMessage.ContentType to 'text/calendar' accordingly.

- populate ONLY the TIdMessage.MessagePart and leave the TIdMessage.Body empty, and set the TIdMessage.ContentType to 'multipart/...' accordingly.

You should read my article on Indy's website about how multi-part emails actually work (it is geared towards HTML email, but much of it applies to this situation too. Just replace HTML with Calendar).

https://www.indyproject.org/2005/08/17/html-messages/

Also, the 'method' attribute in your 'Content-Type' header does not match the METHOD field in the calendar data. They need to match.

Reply


Messages In This Thread
sending event email - by ccMcBride - 08-27-2019, 02:33 PM
RE: sending event email - by rlebeau - 08-27-2019, 06:19 PM
RE: sending event email - by ccMcBride - 08-28-2019, 02:30 PM
RE: sending event email - by rlebeau - 08-28-2019, 04:45 PM
RE: sending event email - by ccMcBride - 08-28-2019, 07:16 PM
RE: sending event email - by rlebeau - 08-28-2019, 08:19 PM
RE: sending event email - by ccMcBride - 08-29-2019, 03:12 PM
RE: sending event email - by rlebeau - 08-30-2019, 01:39 AM
RE: sending event email - by ccMcBride - 08-30-2019, 03:00 PM
RE: sending event email - by rlebeau - 08-30-2019, 05:30 PM
RE: sending event email - by ccMcBride - 09-03-2019, 05:46 PM
RE: sending event email - by rlebeau - 09-03-2019, 11:12 PM
RE: sending event email - by ccMcBride - 09-04-2019, 01:27 PM
RE: sending event email - by rlebeau - 09-04-2019, 07:46 PM
RE: sending event email - by ccMcBride - 09-05-2019, 03:07 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)