Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #10831

Re: CEmail and Content-type

From "Jamal" <noooospam@example.com>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: CEmail and Content-type
Date 2017-08-04 15:58 -0400
Organization albasani.net
Message-ID <om2jli$oo8$1@news.albasani.net> (permalink)
References <fc7460a6-04d9-4c11-b334-eea82b2db8d3@googlegroups.com> <om113r$74p$1@news.albasani.net> <0372f42e-7cd9-4c47-9af5-7d4a44060bc5@googlegroups.com>

Show all headers | View raw


Glenn,

Use

oMail:BodyHtml instead of oMail:Body.

Jamal

"Glenn Keeler"  wrote in message 
news:0372f42e-7cd9-4c47-9af5-7d4a44060bc5@googlegroups.com...

On Thursday, 3 August 2017 23:35:57 UTC-6, Jamal  wrote:
> I assume you're attaching the vCalender request as a file, if continue
> reading below.

Thanks Jamal. Attaching the file is a fallback option so your code is handy 
for that, but I am trying to include the vcalendar as the body of the email. 
In Outlook, this creates the Accept/Decline buttons as soon as the email is 
opened.

Here is the code I am using to attempt this annotated a bit based on 
watching the objects in debug.

Method Send RSVP((cMailServer AS STRING, cRSVP AS STRING, aInvitees AS 
ARRAY, cOrganizerName AS STRING, cOrganizerEmail AS STRING,cDescription AS 
STRING) CLASS StandardShellWindow

LOCAL oEmail AS CEmail
LOCAL oSmtp AS CSmtp
LOCAL cRet := "" AS STRING
LOCAL aTo := {} AS ARRAY
LOCAL nToCtr := 1 AS DWORD

FOR nToCtr := 1 UPTO ALen(aInvitees)
AAdd(aTo,aInvitees[nToCtr][2])
NEXT

oEMail:= CEmail{}
oEmail:FromAddress := cOrganizerEmail
oEmail:FromName := cOrganizerName
oEmail:Subject := cDescription
oEmail:Body := cRSVP+CRLF+CRLF
// cRSVP is the VCALENDAR text
oEmail:DestList := aTo
oEmail:CCList := cOrganizerEmail
oEmail:ContentType := [text/calendar; method=REQUEST; charset="UTF-8"]
// At this point, oEmail:ContentType has the value I want

oSmtp := CSmtp{oEmail}
oSmtp:MailApplication := "Keeler Services"
oSmtp:RemoteHost := cMailServer
oSmtp:RemotePort := 25

IF oSmtp:SendMail()
   // at this point the ContentType attribute has reverted to
   // text/plain; charset="iso-8859-1"
ELSE
cRet += "Error sending email. "
cRet += NTrim(oSmtp:Error)+" "+AllTrim(oSmtp:ErrorMsg)
END
oSmtp:Axit()
oSmtp:Disconnect()
oSmtp := NULL_OBJECT
oEmail:= NULL_OBJECT
return cRet 

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

CEmail and Content-type Glenn Keeler <glennkeeler@shaw.ca> - 2017-08-03 21:20 -0700
  Re: CEmail and Content-type "Jamal" <noooospam@example.com> - 2017-08-04 01:35 -0400
    Re: CEmail and Content-type Glenn Keeler <glennkeeler@shaw.ca> - 2017-08-04 12:13 -0700
      Re: CEmail and Content-type "Jamal" <noooospam@example.com> - 2017-08-04 15:58 -0400
        Re: CEmail and Content-type Glenn Keeler <glennkeeler@shaw.ca> - 2017-08-04 13:03 -0700
          Re: CEmail and Content-type "Jamal" <noooospam@example.com> - 2017-08-04 16:19 -0400

csiph-web