How to send mails using Code without opening Outlook

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AR Ratheesh
    New Member
    • Jul 2009
    • 25

    How to send mails using Code without opening Outlook

    Hi Guys,
    Need help to sent mails using code.i have a table containing 2 fields 1.Name,2.Email ID.and an another table(Data to be attached).
    Code:
    Private Sub Command0_Click()
    On Error GoTo Err_Command0_Click
    
        DoCmd.SendObject acTable, "Table1", "MicrosoftExcelBiff5(*.xls)", "sentname@aaa.com", "", "", "trail", "", False, ""
    
    Exit_Command0_Click:
        Exit Sub
    
    Err_Command0_Click:
        MsgBox Err.Description
        Resume Exit_Command0_Click
        
    End Sub
    But this will shows the Outlook.I dont want to show Outlook and sent mailing process should be in background...
    Please help me...
    thanks in adv.
    Last edited by NeoPa; Oct 16 '09, 11:59 PM. Reason: Please use the [CODE] tags provided.
  • ajalwaysus
    Recognized Expert Contributor
    • Jul 2009
    • 266

    #2
    I don't know about MS Access 2007, but I have extensively researched emailing from MS Access 2003, and the issue is that if you want to be able to send an email without Outlook popping up, the only way i know of is if you can use your company's "SMTP Mail Host". If you can get that, then I can walk you through how to use that to email with CDO.

    This is much more technical, so let me know if you wish to go forward with this.

    -AJ

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32633

      #3
      Please notice the edit comments. You must post code using the tags in future.

      Comment

      Working...