Quote:
>is there a way to send a mail from vb6 if the user doesnt have outlook or
>any other mail client or a e-address at all?
There's two general approaches that you could use to do this.
If you're familiar with the SMTP protocol, you could implement
a basic client fairly easily with one of the Winsock controls
out there (either our SocketWrench or one of the others). If
you're looking for something to handle the protocol side of
things then you might want to take a look at SocketTools. It
includes MIME and SMTP controls which make it simple to create
and send messages. Some basic code would look like this:
MailMessage1.From = strSender
MailMessage1.To = strRecipients
MailMessage1.Subject = strSubject
MailMessage1.Text = strBody
SmtpClient1.Blocking = True
SmtpClient1.HostName = strHostName
If SmtpClient1.Connect() = 0 Then
If MailMessage1.ExportFile("") = 0 Then
nError = SmtpClient1.SendMessage(strSender, strRecipients, "")
End If
SmtpClient1.Disconnect
End If
Our e-mail controls also support features like authentication,
file attachments, automatic quoted-printable encoding and
decoding and so on. You can download a free evaluation version
of SocketTools from our website at www.catalyst.com
David