Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
sending event email
#3
my smtp settings (this works with all other emails)
Code:
      SMTP.Host := cdsDefaultSettings.FieldByName('SERVERNAME').AsString;
      SMTP.Username := cdsDefaultSettings.FieldByName('USERNAME').AsString;
      if cdsDefaultSettings.FieldByName('Enable_ssl').AsBoolean then
      begin
         SMTP.AuthType := satDefault;
         SMTP.Password := DecryptStr(cdsDefaultSettingsACCOUNT_ID.AsInteger);
      end
      else
         SMTP.AuthType := satNone;
      if (not IsNullStr(cdsDefaultSettings.FieldByName('PORT').AsString)) and
         (cdsDefaultSettings.FieldByName('PORT').AsInteger <> 0) then
         SMTP.Port := cdsDefaultSettings.FieldByName('PORT').AsInteger
      else
         SMTP.Port := 25;
      if cdsDefaultSettings.FieldByName('flags').AsInteger <> 0 then
      begin
         IOHandler.Host := SMTP.host;
         IOHandler.Port := SMTP.Port;
         if cdsDefaultSettings.FieldByName('flags').AsInteger = 4 then
            ioHandler.sslOptions.method := sslvTLSv1_2
         else
            ioHandler.SSLOptions.Method := TIDSSLVersion(cdsDefaultSettings.FieldByName('flags').AsInteger - 1);
         SMTP.IOHandler := ioHandler;
         if cdsDefaultSettings.FieldbyName('flags').AsInteger = 4 then
            SMTP.UseTLS := utUseExplicitTLS;
      end
      else
      begin
         SMTP.ioHandler := nil;
         SMTP.UseTLS := utNoTLSSupport;
      end;
//   end;


   emMessage.From.Address := cdsDefaultSettings.fieldByName('username').AsString;
   if not isNullStr(cdsDefaultSettings.fieldByname('display_name').AsString) then
      emMessage.From.Name := cdsDefaultSettings.FieldbyName('display_name').AsString
   else
      emMessage.From.Name := globalConnection.LoginRec.LoginName;
   if cdsuserEmail.IsEmpty then
      emMessage.ReplyTo.EMailAddresses := cdsDefaultSettings.fieldByName('username').AsString
   else
      emMessage.ReplyTo.EMailAddresses := cdsUserEmail.fieldByName('email_prime').AsString;
   emMessage.From.Address := emMessage.ReplyTo.EmailAddresses;


I changed the main message part to multipart/mixed, still error.
as test, I also did the following:
(1)
Code:
      dmEmail.emMessage.ContentType := 'text/calendar;method=PUBLISH';
      dmEmail.emmessage.Body.Text := eventText.Text;

//      with tIDText.Create(dmEMail.emMessage.Messageparts) do
//      begin
//         ContentType := 'text/calendar;method=PUBLISH';
//         Body.Text := eventText.Text;
//      end;
//      with TIdAttachmentFile.Create(dmEmail.emMessage.MessageParts, fName) do
//      begin
//         ContentDisposition := 'inline';
//         ContentType := 'text/calendar;method=REQUEST';
//         ExtraHeaders.Values['Content-ID'] := ExtractFileName(fName);
//         ContentID := ExtractFileName(fName);
//         Filename := ExtractFilename(fName);
////           parentPart := 1;
//      end
it was sent with no errors, the event was attached as an ICS file, no 'accept/decline' on email

mail.txt:
Code:
Subject: Meeting
To: Conniem@provantagesoftware.com
Content-Type: text/calendar; method=PUBLISH; charset=us-ascii; boundary="Z3x5XLdCh3=_gG99ZJaoS8M91yBNfYNSeh"
MIME-Version: 1.0
Date: Wed, 28 Aug 2019 07:19:40 -0700

BEGIN:VCALENDAR
PRODID:-www.provantagesoftware.com/v1.0/id=179
VERSION:2.0
METHOD:REQUEST
BEGIN:VEVENT
ORGANIZER;CN=Connie M.:MAILTO:Conniem@provantagesoftware.com
DTSTART:20190831T000000Z
DTEND:20190831T010000Z
TRANSP:OPAQUE
SEQUENCE:0
UID:179
DTSTAMP:20190828T071900Z
DESCRIPTION:Gun Range Location
SUMMARY:Meeting
PRIORITY:2
ATTENDEE;RSVP=TRUE:mailto:Conniem@provantagesoftware.com
END:VEVENT
END:VCALENDAR

--Z3x5XLdCh3=_gG99ZJaoS8M91yBNfYNSeh
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline



--Z3x5XLdCh3=_gG99ZJaoS8M91yBNfYNSeh--

.

(2)
Code:
      dmEmail.emMessage.ContentType := 'text/calendar;method=REQUEST';
      dmEmail.emmessage.Body.Text := eventText.Text;

blew up.
Mail.txt:
Code:
Subject: Meeting
To: Conniem@provantagesoftware.com
Content-Type: text/calendar; method=REQUEST; charset=us-ascii; boundary="Ei51sGtBwQfH=_1ikzmtp4ojmouS052Uh1"
MIME-Version: 1.0
Date: Wed, 28 Aug 2019 07:23:56 -0700

BEGIN:VCALENDAR
PRODID:-www.provantagesoftware.com/v1.0/id=179
VERSION:2.0
METHOD:REQUEST
BEGIN:VEVENT
ORGANIZER;CN=Connie M.:MAILTO:Conniem@provantagesoftware.com
DTSTART:20190831T000000Z
DTEND:20190831T010000Z
TRANSP:OPAQUE
SEQUENCE:0
UID:179
DTSTAMP:20190828T072300Z
DESCRIPTION:Gun Range Location
SUMMARY:Meeting
PRIORITY:2
ATTENDEE;RSVP=TRUE:mailto:Conniem@provantagesoftware.com
END:VEVENT
END:VCALENDAR

--Ei51sGtBwQfH=_1ikzmtp4ojmouS052Uh1
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline



--Ei51sGtBwQfH=_1ikzmtp4ojmouS052Uh1--
So, 'something' is missing specifically when I'm sending it with a request method.  just not sure what.

after more banging my head against my desk, I tracked this down to using outlook 365 as my email server.
if I use my gmail account for outgoing email, it works just fine (the email has the accept/tentative/decline buttons when sent to my outlook account).


any further ideas?
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)