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.
Printable View
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.
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 MailMe = "mailto: [email][email protected][/email]" ShellExecute Me.hWnd, "open", MailMe, vbNullString, vbNullString, SW_SHOWNORMAL End Sub
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 :confused: 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.Quote:
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
instead i want to do a program
that allow to write sender, recipient, object, body
and then send the email
Not on any machine I've tried it on.Quote:
Originally Posted by 12345
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?
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
Oh....that is why it opens IE on your machine.Quote:
Originally Posted by 12345
You want to write your own email program?Quote:
Originally Posted by 12345
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
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.Quote:
Originally Posted by 12345
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.)
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.
anyone know a smtp server address that work?
else i can't try the program
How do you specify a subject, message etc.. using the winAPI method?
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.Quote:
Originally Posted by 12345
I meant the api method by Hack. Its the second reply...