|
-
Dec 30th, 2005, 07:40 AM
#1
Thread Starter
Member
[RESOLVED] how send email in vb
hello everybody
how can i send an email without outlook?
there is some code?
i've seen the other thread but i didn't find what i'm looking for.
-
Dec 30th, 2005, 09:00 AM
#2
Re: how send email in vb
This will use whatever the default mail client is.
VB 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
Private Const SW_SHOWNORMAL = 1
Private Sub Command1_Click()
Dim MailMe As String
ShellExecute Me.hWnd, "open", MailMe, vbNullString, vbNullString, SW_SHOWNORMAL
End Sub
-
Dec 30th, 2005, 09:14 AM
#3
Thread Starter
Member
Re: how send email in vb
but this code send an email via browser
i want to send an email directly from vb
for ex.:
____________
| Send email |
on click
from="[email protected]"
to="[email protected]"
object="ciao"
msg="ciao"
-
Dec 30th, 2005, 11:27 AM
#4
Re: how send email in vb
 Originally Posted by 12345
but this code send an email via browser
i want to send an email directly from vb
for ex.:
____________
| Send email |
on click
from=" [email protected]"
to=" [email protected]"
object="ciao"
msg="ciao"
Browser What do you mean? If I run that code from a VB program, it opens and creates a new mail message based on what my default mail program is. It is nothing to do with a browser.
-
Dec 30th, 2005, 11:33 AM
#5
Thread Starter
Member
Re: how send email in vb
for browser, i mean internet explorer
that code open a new window of internet explorer
and then i can write a mail
instead i want to do a program
that allow to write sender, recipient, object, body
and then send the email
-
Dec 30th, 2005, 11:44 AM
#6
Re: how send email in vb
 Originally Posted by 12345
for browser, i mean internet explorer
that code open a new window of internet explorer
and then i can write a mail
Not on any machine I've tried it on.
I have access machines on which the default mail is standard Outlook and other machines on which the default mail is Lotus Notes. When I run that code, it opens whatever the machines default mail package is. Is does nothing with IE.
What is the default mail program on your machine?
-
Dec 30th, 2005, 11:47 AM
#7
Thread Starter
Member
Re: how send email in vb
my default is Hotmail. But i don't want to do in this way.
i've seen a thread where there was a program: fake mailer
but it doesn't work
i want to do a program similar to that one
-
Dec 30th, 2005, 11:52 AM
#8
Re: how send email in vb
 Originally Posted by 12345
my default is Hotmail.
Oh....that is why it opens IE on your machine.
 Originally Posted by 12345
i've seen a thread where there was a program: fake mailer but it doesn't work.
i want to do a program similar to that one
You want to write your own email program?
-
Dec 30th, 2005, 11:56 AM
#9
Thread Starter
Member
Re: how send email in vb
yes.
i've found 2 components: MAPImessages, MAPIsession
i want to know if those one work also without outlook.
excuse my english, i'm italian
-
Dec 30th, 2005, 12:10 PM
#10
Thread Starter
Member
Re: how send email in vb
i've tryed mapi component
but when i send email
since i use hotmail, it ask to type username and password
so i must create a new session?
-
Dec 30th, 2005, 12:19 PM
#11
Re: how send email in vb
 Originally Posted by 12345
i've tryed mapi component
but when i send email
since i use hotmail, it ask to type username and password
so i must create a new session?
Yes. When using any password protecting email system, you would have to supply the necessary credentials.
BTW: MAPI is a Microsoft protocol (the M stands for Microsoft), so in all likelyhood, it would be tied to Outlook. (I say "in all likelyhood" because I've never attempted to write my own email system before, so I could be wrong, but I don't think so.)
-
Dec 30th, 2005, 03:05 PM
#12
Re: how send email in vb
Try this. Make sure you read the text file, if you have a dsl system.
http://vbforums.com/attachment.php?attachmentid=39531
193 people have downloaded version 2, so you can bet that it works. Hotmail may prevent you from relaying the mail off of your server, though. If you have a high speed connection, use their mail instead.
-
Dec 31st, 2005, 09:38 AM
#13
Thread Starter
Member
Re: how send email in vb
anyone know a smtp server address that work?
else i can't try the program
-
Jan 5th, 2006, 02:47 AM
#14
Lively Member
Re: how send email in vb
How do you specify a subject, message etc.. using the winAPI method?
-
Jan 5th, 2006, 05:28 PM
#15
Re: how send email in vb
 Originally Posted by 12345
anyone know a smtp server address that work?
else i can't try the program
Did you read the text file that I included? Some ISP's require you to use your real user name when sending email. You can use any smtp server, as long as you use your user name. I tried that code again, and it worked fine for me.
-
Jan 7th, 2006, 10:58 PM
#16
Lively Member
Re: [RESOLVED] how send email in vb
I meant the api method by Hack. Its the second reply...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|