VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Email with Attachments

Dogs  (2 Submissions)   Custom Controls/Forms/Menus   Intermediate   Wed 3rd February 2021

This code once compiled to an ocx, can be added as a user control to any VB6 form.
It allows you the user to send an mail via an smtp server, but where this code shines is the ability to add an attachment to your Email.

Inputs
Email1.MailFrom = "[email protected]" Email1.MailMessage = "This is a test" Email1.MailSubject = "This is a test" Email1.MailTo = "[email protected]" Email1.PortNumber = 25 Email1.ServerName = "your smtp server" Email1.Attachment = "C:\Newsletter-v1.jpg" Email1.SendMail

Returns
An event is raised MailFailed this returns a number but there is a public variable within the routine that returns as text the actual Text, this can be an error message or a message to say Mail Sent Successfully

Rate Email with Attachments (2(2 Vote))

Download Email with Attachments

Email with Attachments Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters