Bulk export of email configuration from a database | ActiveX/VBSScript registry editor
ActiveX NT User account manager
Export MDB/DBF from ASP
Url replacer, IIS url rewrite Active LogFile Email export ActiveX/ASP Scripting Dictionary object
| ||
| Sample for EmailExport.Account.AccountName |
| 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 | |