student needs help

I'm still studying at school, and I want to create an executable that will e-mail a specific file to a pre-determined list of e-mail.  All I need is--> how can I send the file to a     e-mail account, I really have no clue as how to do it, I only need help for this part of my do I code to make the file "c:.../.../... .txt" go to this e-mail address without me doing anything.  I only need a bit of code to get me started.
                       thanx in advance.

                    Thanx in advance.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

there is a RFC for SMTP.
I have a sample that is all of 5 lines long.
for a single mailing.
It would be simple to add a for loop
which part do you need?
the SMTP is REALLY easy using winsock.ocx
There is a sample of VB and e-mail in the VB samples directory which is normally installed in VB\Samples\CompTool\VBMail  I have a sample of attaching a file to an e-mail and sending it at work, but I wont be able to send it until Monday.

It works by signing on to your MAPI session (of Windows it's sometimes Outlook) and sending the message through your MAPI compliant e-mail system.
This will work very well but it requires that you have a:    DSSocket    Sockets control

You can goto this website and download a shareware?? version of this control.

These are the definitions of the variables being used.  

DSSocket -- Sockets control

lBlockSize -- The maximum size of the file after being split up for more accurate sending
From -- Sender's email address

To -- Recipient's email address

Subject -- Subject of the message

szText -- Any text you want to tag on
to the top of the message.

 Dim nMsgFile    As Integer
 Dim szLine      As String
 Dim szBuffer    As String

On Error GoTo nSendFileAsMsg_Error
If lBlockSize = 0 Then
   lBlockSize = 8192
End If
'-- Open the message file
nMsgFile = FreeFile
Open szFileName For Binary As  nMsgFile
    '-- szBuffer holds up to <blocksize> number of bytes
    '   and is sent when it becomes full.
    '-- Send the header first
    szBuffer = "DATE: " & Format$(Now, "dd mmm yy ttttt") & vbCrLf _
        & "FROM: " & From & vbCrLf _
        & "TO: " & To & vbCrLf _
        & "SUBJECT: " & Subject & vbCrLf & vbCrLf _
        & szText & vbCrLf
    SendData DSSocket, szBuffer
'-- Send the file in segments
Do Until EOF(nMsgFile)
    szBuffer = Space$(lBlockSize)
    Get #nMsgFile, , szBuffer
    SendData DSSocket, szBuffer
Close nMsgFile
'-- Send the final period.
SendData DSSocket, vbCrLf & "." & vbCrLf
    nSendFileAsMsg = Err
    On Error Resume Next
    Close nMsgFile


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.