HB_SendMail problem

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Georg_BA
Posts: 34
Joined: Fri Apr 07, 2017 5:31 pm
DBs Used: DBF
Been thanked: 1 time

Re: HB_SendMail problem

Post by Georg_BA » Sat Dec 15, 2018 3:04 pm

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

User avatar
serge_girard
Posts: 2183
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 484 times
Been thanked: 108 times
Contact:

Post by serge_girard » Sat Dec 15, 2018 9:54 pm

What about sending the file to yourself? Or change the file (at the end) a bit and then resent?

Serge

User avatar
serge_girard
Posts: 2183
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Has thanked: 484 times
Been thanked: 108 times
Contact:

Post by serge_girard » Sat Dec 15, 2018 9:56 pm

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

User avatar
jairpinho
Posts: 256
Joined: Mon Jul 18, 2011 5:36 pm
Location: Rio Grande do Sul - Brasil
Been thanked: 5 times
Contact:

Post by jairpinho » Sun Dec 16, 2018 12:04 am

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

Jair Pinho
HMG ALTA REVOLUÇÃO xBASE
HMG xBASE REVOLUTION HIGH
http://www.hmgforum.com.br

Post Reply