Solved

Send e-mail with vb

Posted on 1999-01-05
11
183 Views
Last Modified: 2010-05-03
I want to send e-mail with VB5.0 (not with mapi) in NT4.0,
Can you help me?
I will appreciate if you can give me any suggestions or
send me the full free source code or OCX or other DLL etc.
Thanks

Huang x.b.
0
Comment
Question by:huangxb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 3
  • +1
11 Comments
 
LVL 14

Accepted Solution

by:
waty earned 200 total points
ID: 1453922
Do as follow :

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

ShellExecute 0&, vbNullString, "mailto:waty.thierry@usa.net", vbNullString, vbNullString, vbNormalFocus

0
 

Author Comment

by:huangxb
ID: 1453923
Thanks for your help.
Can you give me more suggestion or full sample code?
I want to write a auto reply e-mail with vb in NT.

0
 
LVL 14

Expert Comment

by:waty
ID: 1453924
This is the way I use in my shareware to allow the user to send me mail.

I think by adding some parameters, you can create a full body, title.... but I have never tried it.
0
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 

Author Comment

by:huangxb
ID: 1453925
Thanks
Can you tell me how to use the shell32.dll?
    ShellExecute 0&, vbNullString, "huangxb@usa.net", _
      vbNullString, vbNullString, vbNormalFocus
I want to send e-mail automatically by VB, and do not want to send it manually, That
means nobody will press the keyboard or mouse.
What are the parameters should I place in the "vbNullString" and "vbNormalFOcus"?

huang X.B.
0
 
LVL 14

Expert Comment

by:waty
ID: 1453926
I don't know for the parameters, you shoukd try some.
0
 
LVL 5

Expert Comment

by:kulikuli
ID: 1453927
There are no parameters for such using the function from waty. You'll have to write an smtp client for example to independently send email. I've been trying this for a few weeks but its very difficult
0
 
LVL 1

Expert Comment

by:eversoslightly
ID: 1453928
I have been looking for such an example on the Internet, and I have found SMTP Ocx's.  If you wish, I could send these URL's to you.
0
 

Author Comment

by:huangxb
ID: 1453929
Thanks for your help.
Hi, eversoslightly
I will appreciate if you can you show me the URL's to me?
If it is helpful, I will give my points to you.



0
 
LVL 5

Expert Comment

by:kulikuli
ID: 1453930
I would be very happy when someone is able to provide a sample that's independently of any ocx's. I will reward him/her of course with generous points!
0
 
LVL 1

Expert Comment

by:eversoslightly
ID: 1453931
Well, kulikuli, first off, you are going to need to connect to the smtp server, using port 25 (the smtp port standard).  Then look for the rfc document (here's one: http://www.eimb.relarn.ru/Connected/RFC/821/12.html ) on SMTP to learn what commmands to send etc. to send email through your smtp server.  I don't think it is very hard.  I would suggest getting a program like EasyTerm (what I use) to experiment.  EasyTerm is simply a telnet client, but you can connect using whatever port you wish.

I dig up those url's, huangxb, asap.
0
 
LVL 5

Expert Comment

by:kulikuli
ID: 1453932
I will not 'spam' this topic any longer with my smtp questions. Instead I opened my own question on the SMTP problem(challenge). I still need to know how to connect to port 25.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question