|
-
Apr 28th, 2003, 09:03 AM
#1
Thread Starter
Lively Member
Sending Email with vb - attachments become body?
I am using vb to send out emails automatically with outlook 97 and exchange server 5.5. Internally everything works great, but when emails go externally the attachment (text file) becomes part of the body of the text. I believe this code was working at one time, but stopped working a few weeks ago. Does anyone know of any patches for outlook or exchange that would cause this or if i can change my code to fix the problem? The email and my source are shown below - If anyone can help me, it would greatly be appreciated.
code:
Sub SendEmail(attachfile, txtEmailList, txtReportName)
Dim o
Dim m
Set o = CreateObject("Outlook.Application")
Set m = o.CreateItem(0)
m.To = txtEmailList
m.Subject = txtReportName
m.Body = " "
m.Attachments.Add attachfile
'Repeat this line if there are more Attachments
m.Send
'm.Send 'If you want to just send it
End Sub
Email example:
Date: Thu, 24 Apr 2003 08:15:21 -0400
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)
Content-Type: multipart/mixed;
boundary="----_=_NextPart_000_01C30A5B.2D400D60"
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_000_01C30A5B.2D400D60
Content-Type: text/plain
------_=_NextPart_000_01C30A5B.2D400D60
Content-Type: text/plain;
name="report2.txt"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="report2.txt"
Application~SSN~Emp Name~Term Beg~Term End~Amount~Check~Receipt =
Proof~Grades Proof~Pay to Name =
=
=
=
=
=
=
=
=
=
=
=
=
1200~xxx~NICHOLE, WHITFIELD =
L~01/06/2003~05/05/2003~1326~32843~01/07/2003~~Grand Valley State =
University
1282~xxx~RACHEL, REEDER R~03/13/2003~04/17/2003~1257~35089~~~*** =
Invalid Award Vendor 100571
------_=_NextPart_000_01C30A5B.2D400D60--
**********************
** LEGAL DISCLAIMER **
**********************
This E-mail message and any attachments may contain
legally privileged, confidential or proprietary
information. If you are not the intended recipient(s),
or the employee or agent responsible for delivery of
this message to the intended recipient(s), you are
hereby notified that any dissemination, distribution
or copying of this E-mail message is strictly
prohibited. If you have received this message in
error, please immediately notify the sender and
delete this E-mail message from your computer.
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
|