|
-
Mar 27th, 2000, 08:38 AM
#1
Thread Starter
Lively Member
I've downloaded a lot of VB samples showing how to send emails and email attachments using the winsock control. The problem I have is that for encoding attachments of a reasonable size using Base64 seems to be extremely slow. What can I do to speed up the encoding process? Are there faster alternatives to using the winsock control?
-
Mar 27th, 2000, 07:06 PM
#2
Lively Member
If you have Outlook on your machine you can send Emails/Attachments with this code.
(Remember to reference the Microsoft Outlook Object in your project references section.)
Code:
Set myOlApp = CreateObject("Outlook.Application")
Set myitem = myOlApp.CreateItem(olMailItem)
Set myAttachments = myitem.Attachments
'Add the attachment(s)
myAttachments.Add "C:\Test.txt", olByValue, 1, "Test File"
'Set the recipient name(s)
myitem.To = "Place Recipient Address Here"
'Send the Mail Item
myitem.Send
Hope this helps.
-
Mar 28th, 2000, 07:59 AM
#3
Thread Starter
Lively Member
To add some more information to what I am trying to achieve. There are a few key things I am trying to do. Attach a file, change the sender name, and send as a custom form. I would like to build it into a component so that it can be reused. The immeadiate use is for a server based application which will send emails on behalf of other users. With CDO I seemed to be able to change the sender, but its not very nice cause it involved creating and deleting address entries. I am hoping (fingers crossed) there is a nicer way to do it from VB.
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
|