This sample demonstrates work with IAF (Internet account file) format. It let's you export email account data feom database to configuration fole for Outlook or Outlook express.
Bulk export of email configuration from a database | |
---|---|
Option Explicit 'Create account exporter object Dim Export Set Export = CreateObject("EmailExport.Account") 'Set common properties - servers. Export.SMTPServer = "smtp.mail-domain.com" Export.POP3Server = "pop3.mail-domain.com" 'open connection and recordset with source data. Dim Conn, RS Set Conn = GetDBConn("F:\work\Market\DB\market.mdb") 'The source table contains name of the person, email and password Set RS = Conn.Execute("Select person, email, password from Emails") Do While Not rs.eof 'Save private account properties Export.AccountName = "Mail-Domain, " & RS("email") Export.SMTPEmailAddress = RS("email") Export.SMTPDisplayName = RS("person") 'The server uses Email as a POP3 Logon name Export.POP3UserName = "" & RS("email") Export.POP3Password = "" & RS("password") 'Save the IAF file. Export.SaveIAFFile Export.AccountName & ".IAF" RS.MoveNext Loop Function GetDBConn(MDBDatabase) Dim GlobalConn Set GlobalConn = CreateObject("ADODB.Connection") GlobalConn.Provider = "Microsoft.Jet.OLEDB.4.0" GlobalConn.open "Data Source=" & MDBDatabase Set GetDBConn = GlobalConn End Function |
Export of email account settings to the .iaf file format.
Email Account configuration exporter is an ActiveX/COM library, which let's you work with Outlook and Outlook Express email account configuration in VB script/JScript and other programming languages (t-SQL, C++, VBA, php, c#, Delphi...). You can create POP3, IMAP and HTTP email configurations or NNTP news account and export them directly from the script. You can export all fields, including servers, SPA, user names, emails, passwords, etc.
© 1996 - 2009 Antonin Foller, Motobit Software | About, Contacts | e-mail: info@pstruh.cz