Wrox Programmer Forums
|
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 13th, 2006, 11:30 AM
Registered User
 
Join Date: Dec 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Email using VB6

How can I email using vb6? Can I access mails from yahoo?
Can I paste pictures in emails?

 
Old January 2nd, 2007, 10:44 AM
Registered User
 
Join Date: Jan 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to JAva_TEcH
Default

yes you can mail from vb6

These are free for non-commercial usage. Check websites for current requirements for commerical use.

STMP Component http://www.ostrosoft.com
POP3 Component http://www.ostrosoft.com

and if you would like to mail from the default mail app

Code:
Private Declare Function ShellExecute Lib "SHELL32.DLL" Alias "ShellExecuteA" _
(ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, _
ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Public Const SW_ShowNormal = 1

'This opens the system's default email application, with content 'filled in

Dim temp As String, iReturn As Long
Dim EmailReceiver As String, Subject As String, Message As String

EmailReceiver = "[email protected]"
Subject = "Greetings"
Message = "How are you today?"   'use hex %0D%0A for new lines

temp = "mailto:" & EmailReceiver & "?subject=" & Message & "&body=" & Message

iReturn = ShellExecute(0&, "Open", temp, vbNullString, vbNullString, SW_ShowNormal)
JAva_TEcH
 
Old January 6th, 2007, 09:58 AM
Registered User
 
Join Date: Dec 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for your help, I'll check it out







Similar Threads
Thread Thread Starter Forum Replies Last Post
Using vb6 to send email with attachment LeonMK Pro VB 6 3 August 25th, 2011 01:56 AM
SUB NAME IN VB6 Nadalik VB How-To 2 June 21st, 2006 03:30 AM
VB6 how to use a COM+ pevl VB Components 3 November 26th, 2005 09:16 AM
Troubles using MAPI email in VB6 mwphillips Pro VB 6 1 August 12th, 2003 01:29 AM
VB6 ?? wickman Wrox Book Feedback 1 June 5th, 2003 08:50 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.