Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #12265 > unrolled thread
| Started by | Jeff Rollo <jrollo64@gmail.com> |
|---|---|
| First post | 2019-02-15 20:15 -0800 |
| Last post | 2019-02-19 23:49 +0100 |
| Articles | 3 on this page of 23 — 5 participants |
Back to article view | Back to comp.lang.clipper.visual-objects
cEmail and cSMTP cannot send Jeff Rollo <jrollo64@gmail.com> - 2019-02-15 20:15 -0800
Re: cEmail and cSMTP cannot send Sherlock <sherlock@sherlock.com.au> - 2019-02-16 04:52 -0800
Re: cEmail and cSMTP cannot send Jeff Rollo <jrollo64@gmail.com> - 2019-02-16 04:56 -0800
Re: cEmail and cSMTP cannot send Sherlock <sherlock@sherlock.com.au> - 2019-02-16 05:22 -0800
Re: cEmail and cSMTP cannot send Jeff Rollo <jrollo64@gmail.com> - 2019-02-16 05:29 -0800
Re: cEmail and cSMTP cannot send Sherlock <sherlock@sherlock.com.au> - 2019-02-16 05:36 -0800
Re: cEmail and cSMTP cannot send Jeff Rollo <jrollo64@gmail.com> - 2019-02-16 14:50 -0800
Re: cEmail and cSMTP cannot send Sherlock <sherlock@sherlock.com.au> - 2019-02-17 01:42 -0800
Re: cEmail and cSMTP cannot send Jeff Rollo <jrollo64@gmail.com> - 2019-02-17 02:06 -0800
Re: cEmail and cSMTP cannot send Jeff Rollo <jrollo64@gmail.com> - 2019-02-17 02:11 -0800
Re: cEmail and cSMTP cannot send Sherlock <sherlock@sherlock.com.au> - 2019-02-16 05:31 -0800
Re: cEmail and cSMTP cannot send Jeff Rollo <jrollo64@gmail.com> - 2019-02-16 05:34 -0800
Re: cEmail and cSMTP cannot send Sherlock <sherlock@sherlock.com.au> - 2019-02-16 05:38 -0800
Re: cEmail and cSMTP cannot send Sherlock <sherlock@sherlock.com.au> - 2019-02-16 10:09 -0800
Re: cEmail and cSMTP cannot send "Wolfgang Riedmann" <wriedmann@gmail.com> - 2019-02-17 11:35 +0100
Re: cEmail and cSMTP cannot send Jeff Rollo <jrollo64@gmail.com> - 2019-02-17 02:43 -0800
Re: cEmail and cSMTP cannot send "Wolfgang Riedmann" <wriedmann@gmail.com> - 2019-02-18 06:37 +0100
Re: cEmail and cSMTP cannot send Franz Rachbauer <office@rachbauer.org> - 2019-02-17 12:29 +0100
Re: cEmail and cSMTP cannot send Jeff Rollo <jrollo64@gmail.com> - 2019-02-17 03:31 -0800
Re: cEmail and cSMTP cannot send D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2019-02-18 23:58 +0100
Re: cEmail and cSMTP cannot send Jeff Rollo <jrollo64@gmail.com> - 2019-02-19 02:29 -0800
Re: cEmail and cSMTP cannot send Jeff Rollo <jrollo64@gmail.com> - 2019-02-19 02:31 -0800
Re: cEmail and cSMTP cannot send D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2019-02-19 23:49 +0100
Page 2 of 2 — ← Prev page 1 [2]
| From | Jeff Rollo <jrollo64@gmail.com> |
|---|---|
| Date | 2019-02-19 02:29 -0800 |
| Message-ID | <55d1f9a3-5a58-49f9-8354-fce905bf70ba@googlegroups.com> |
| In reply to | #12293 |
Hi Dick. The exact problem is that the attachment name appears in the subject line; not as an attachment. No doubt my coding error, but I don't know what I need to change. Thanks very much for any help you may be able to give me. Jeff
[toc] | [prev] | [next] | [standalone]
| From | Jeff Rollo <jrollo64@gmail.com> |
|---|---|
| Date | 2019-02-19 02:31 -0800 |
| Message-ID | <56b7a9ef-e770-4b09-9d19-7585a8c08ce0@googlegroups.com> |
| In reply to | #12298 |
Sorry, forgot. VO 2.8 SP4b Build 2838
[toc] | [prev] | [next] | [standalone]
| From | D.J.W. van Kooten <vankooten@removethis.ic2.com> |
|---|---|
| Date | 2019-02-19 23:49 +0100 |
| Message-ID | <0q0p6eh7lgpqt57os7aahd5tl99kh8tugq@4ax.com> |
| In reply to | #12298 |
Replying on message of Tue, 19 Feb 2019 02:29:47 -0800 (PST) from Jeff
Rollo:
Hello Jeff,
>Hi Dick. The exact problem is that the attachment name appears in the subject line; not as an attachment. No doubt my coding error, but I don't know what I need to change.
>
Very odd. So instead of Test Email you get
C:\cavo28\bin\JobNumber.rpt? Or both?
I would check :
CEmail:MimeHeader() Method
and also the parameters of AddAttachment:
<oCEmail>:AddAttachment(<cFullPath>,
[<cContentType>],[<dwEncodeType>], [<cFileName>]) ---> lSuccess
For content type the help says:
<xContentType> Content type to use when encoding. The default is the
content type of the message. When one of the following is used VO will
assume that the file is part of the body:
CONTENT_TEXT_PLAIN
CONTENT_TEXT_HTML
CONTENT_TEXT_MULTIPART
If another type is used, VO will assume that the file is not
part of the message body but an attachment
This should not bring an attachment in the subject, but could add the
attachment contenbt in the body, e.g. a picture shows in the mail
instead of as a seperate attachment.
Alternatively:
I checked your code and compared it to some older code we used with
the CEmail class and I do not really see big differences. Apart from
unequal quotes in the oEmail:FromAddress line (a single opening
quot and a double closign quot which I guess is correct in your code
otherwise it would not compile).
We apply the SMTP calls a bit different.
Here's my code, for e-mailing VOerrors; I left out some irrelevant
lines. You could check if it works for you with if you rearrange a
few things. Also: what is the return value of AddAttechments (should
be: true)?
METHOD EmailError (cError AS STRING, cDetails AS STRING) AS LOGIC
PASCAL CLASS MyCGI
LOCAL oEmail AS CEmail
LOCAL cMailbody AS STRING
LOCAL cEvent AS STRING
LOCAL cSavefile AS STRING
LOCAL cSearch AS STRING
LOCAL cSubject AS STRING
LOCAL dwStart AS DWORD
LOCAL dwEnd AS DWORD
LOCAL lRet AS LOGIC
LOCAL aResult AS ARRAY
cSubject := Upper (SELF:cExeName) + " Error: " + cDetails
// Finish the e-mail body:
cMailbody := '<html><body>' + CRLF
cMailbody += '<p><b>' + cSubject + '</b></p>' + CRLF // etc
// Set parameters:
oEmail := CEmail{}
oEmail:Subject := cSubject
oEmail:DestList := "x@y.com"
oEmail:BodyHtml := cMailbody
oEmail:Body := StripHTML(cMailbody)
oEmail:FromAddress := SELF:cFromAddress
oEmail:FromName := SELF:cFromName + " Web"
oEmail:ReplyTo := SELF:cFromAddress
oEmail:Priority := 1 // high priority
oEmail:Cargo := "X-Mailer: SMTP Mail Client - Powered by CA Visual
Objects"
IF !oEmail:AddAttachment(cSavefile)
cEvent := "Add attachment failed: " + cSavefile
RETURN FALSE
ENDIF
oEmail:SetHeaderInfo()
// Send e-mail:
aResult := SELF:Mail2SMTP(oEmail)
lRet := aResult [1]
IF lRet
cEvent := "Error sent: " + cSubject + " (" + cSavefile + ")"
ENDIF
RETURN lRet
METHOD Mail2SMTP(oEmail AS CEmail) AS ARRAY PASCAL CLASS MyCGI
LOCAL oSmtp AS CSmtp
LOCAL aReturn AS ARRAY
oSmtp := CSmtp{oEmail, SELF:cMailserver}
oSmtp:SecureSMTP := TRUE
oSmtp:UserName := SELF:cMaillogin
oSmtp:PassWord := SELF:cMailpassw
oSmtp:TimeOut := 10000
aReturn := ArrayCreate (3)
aReturn [1] := oSmtp:SendMail()
aReturn [2] := NTrim(oSmtp:Error)
aReturn [3] := StrTran(oSmtp:ErrorMsg, CRLF)
RETURN aReturn
Dick
[toc] | [prev] | [standalone]
Page 2 of 2 — ← Prev page 1 [2]
Back to top | Article view | comp.lang.clipper.visual-objects
csiph-web