Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Viveka Fischer   on Mar 18 In MS Office Category.

  
Question Answered By: Kim Cruz   on Mar 18

The best way to send automated  emails is to simply avoid Outlook! Try
using a third-party SMTP library like Ostrosoft's COM. You can
download a free version at http://www.ostrosoft.com/products.asp.

1. download smtp_component.zip
2. from downloaded file unzip OSSMTP.dll to Windows System directory
3. run "regsvr32 OSSMTP.dll" from command-line
4. In Excel's IDE, Select Tools->reference to select the Ostrosoft
SMTP Component.

Then, you can run a module like this:
Option Explicit

Sub testEmail()
Dim SMTP As SMTPSession.SMTP

Set SMTP = New SMTPSession.SMTP
SMTP.Server = "Server.COM" 'Find from Outlook's Tools->Options
mail  Setup Tab and click  Email Accounts. Then click next to
' find your POP/SMTP server name


SMTP.MailFrom = "d@..."
SMTP.SendTo = "f@..."
SMTP.MessageSubject = "Sample report Report"
SMTP.MessageText = "Test Message"
SMTP.Attachments.Add "C:\Report 1"
SMTP.Attachments.Add "C:\Report 2"
SMTP.SendEmail
Set SMTP = Nothing

End Sub

Share: 

 

This Question has 3 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Automated Emails Message box Or get search suggestion and latest updates.


Tagged: