hi,
i can send mails with smtp but my question is how do i attach attachments to the messages?
oWinsock = CREATEOBJECT("MSWinsock.Winsock.1"
oWinsock.Protocol = 0
oWinsock.RemoteHost = mailserver
oWinsock.RemotePort = 25
oWinsock.Connect
IF oWinsock.State = sckConnected
WAIT CLEAR
oWinsock.senddata("Helo myself.com" + crlf)
oWinSock.senddata("Mail From:"+lcFrom + crlf)
=inkey(.25)
oWinSock.senddata("RCPT TO:" + lcTo + crlf)
=Inkey(.25)
oWinsock.senddata("DATA" + crlf)
oWinsock.senddata("From:" + lcFrom + crlf)
oWinSock.senddata("To:"+ lcTo + crlf)
oWinsock.senddata("Subject:" + lcSubject + crlf)
oWinsock.senddata(crlf + lcBody + crlf)
=Inkey(.25)
** add attachments??? **
oWinsock.senddata("." + crlf)
=Inkey(.25)
oWinsock.senddata("quit"
so what to do to add an attachment "c:\test.txt" to this mail??
thanks in advance
i can send mails with smtp but my question is how do i attach attachments to the messages?
oWinsock = CREATEOBJECT("MSWinsock.Winsock.1"
oWinsock.Protocol = 0
oWinsock.RemoteHost = mailserver
oWinsock.RemotePort = 25
oWinsock.Connect
IF oWinsock.State = sckConnected
WAIT CLEAR
oWinsock.senddata("Helo myself.com" + crlf)
oWinSock.senddata("Mail From:"+lcFrom + crlf)
=inkey(.25)
oWinSock.senddata("RCPT TO:" + lcTo + crlf)
=Inkey(.25)
oWinsock.senddata("DATA" + crlf)
oWinsock.senddata("From:" + lcFrom + crlf)
oWinSock.senddata("To:"+ lcTo + crlf)
oWinsock.senddata("Subject:" + lcSubject + crlf)
oWinsock.senddata(crlf + lcBody + crlf)
=Inkey(.25)
** add attachments??? **
oWinsock.senddata("." + crlf)
=Inkey(.25)
oWinsock.senddata("quit"
so what to do to add an attachment "c:\test.txt" to this mail??
thanks in advance