Default account for email

Leathem

Registered User.
Local time
Today, 17:19
Joined
Nov 29, 2010
Messages
58
I am sending emails (with pdf attachments) from my Access 2010 database using Mozilla Thunderbird. However I have several accounts in Thunderbird. Is there a way to have Access choose the account to use for sending? I've searched Thunderbird to see if there is a way to choose the default account for sending, but no luck, so I'm hoping I can do it from Access. Here's the code I'm using at present:

Code:
Private Sub Command20_Click()
' Error handler
    On Error GoTo 0
    ' Create a SELECT command
    Dim StudentQuery
    StudentQuery = "SELECT [StudentDataQuery].StudentName, [StudentDataQuery].[E-MAIL] FROM [StudentDataQuery]"
    ' Get a recordset using the query
    Dim Recordset
    Set Recordset = CurrentDb.OpenRecordset(StudentQuery)
    ' Move through the recordset looking at each record
    Do Until Recordset.EOF
        Dim StudentName, EmailAddress
        StudentName = Recordset("StudentName")
        EmailAddress = Recordset("E-MAIL")
        Forms.DistributeLetters.StudentName = StudentName
        Forms.DistributeLetters.EmailAddress = EmailAddress
        If EmailAddress = "" Or IsNull(EmailAddress) Then
            Forms.DistributeLetters.EmailAddress = "No Email"
            Else
            DoCmd.SendObject acReport, "Enrolled Students Letter", "PDFFormat(*.pdf)", _
           EmailAddress, "", "", "CLS Course Enrollment confirmation", "Attached please find your confirmation letter. It is in Adobe pdf format.", False, ""
        End If
        Recordset.MoveNext
        Loop
End Sub
Thanks,
Leathem
 
Aargh! I found it shortly after posting this thread. In Thunderbird under /tools/account settings/account actions there is an option for choosing the default account. Sorry for pestering the forums, but maybe this will help someone else!

Leathem
 
That you posted the solution absolves you of the need to apologies imo.

pet peeve of mine, someone who posts a question and 10 minutes laters posts "nm. found the answer". and then runs off :D
 

Users who are viewing this thread

Back
Top Bottom