Page 2 of 2

Re: HB_SendMail problem

Posted: Sat Dec 15, 2018 3:04 pm
by Georg_BA
Hello Serge
the file is existing, the first one in the example is the end of the file being sent, the other is after receiving
when sending it to other mail clients it's okay, what i will send it will also receive

Re: HB_SendMail problem

Posted: Sat Dec 15, 2018 9:54 pm
by serge_girard
What about sending the file to yourself? Or change the file (at the end) a bit and then resent?

Serge

Re: HB_SendMail problem

Posted: Sat Dec 15, 2018 9:56 pm
by serge_girard
George,

This piece

Code: Select all

 --=_0YESNDOCYRVCMJMPWB_TIP_20181211_121813-- 
is exactly what the difference is?
It looks like -- some comment and at the end TIP + date and time...

Serge

Re: HB_SendMail problem

Posted: Sun Dec 16, 2018 12:04 am
by jairpinho
Georg_BA wrote: Wed Dec 12, 2018 10:02 pm Good day
I have a problem with hb_SendMail when I submit an attachment
type CSV, TXT will deliver it with the text added at the end.
Have you met with that?

sample:

Send file contains:

<Cell><Data ss:Type="String">8588005718486</Data></Cell>
<Cell><Data ss:Type="String">9</Data></Cell>
<Cell><Data ss:Type="String">1.0833</Data></Cell>
</Row>
</Table>
</Worksheet>\rn</Workbook>

Receive file containing

<Cell><Data ss:Type="String">8588005718486</Data></Cell>
<Cell><Data ss:Type="String">9</Data></Cell>
<Cell><Data ss:Type="String">1.0833</Data></Cell>
</Row>
</Table>
</Worksheet>\rn</Workbook>--=_0YESNDOCYRVCMJMPWB_TIP_20181211_121813--

Thanks for help


I made some tests and found that the problem with .txt files .rtf I was able to send putting this type of file last in the attachment

Code: Select all

cAnexo1:= "D:\@Drive-TW\@MasterServ\Email\TipMail2\TipMail\teste.txt"
cAnexo2:= "D:\@Drive-TW\@MasterServ\Email\TipMail2\TipMail\teste2.csv"

	IF hb_SendMail("smtp.gmail.com", Val(cPort), cFrom,cTo,NIL /* CC */,{} /* BCC */,"test: body","test: port "+cPort,{cAnexo2,cAnexo1} /* attachment */,cFrom,cPassword, "", NIL /* nPriority */,  NIL /* lRead */, .F. /* lTrace */, .F., NIL /* lNoAuth */, NIL /* nTimeOut */, NIL /* cReplyTo */, iif(cPort=="465",.T.,.F.) /* lSSL */  )
		msginfo("mensagem enviada com sucesso")
		else
		msginfo("falha")
	Endif