I use a similar approach to send mails via the CDO API, inspired by this submission.
To set CDO SMTP settings, some lines like the following can be added after "mail = h.CreateObject('CDO.Message');"
hCdoConfig = h.CreateObject('CDO.Configuration');
hCdoConfig.Fields.Item('http://schemas.microsoft.com/cdo/configuration/sendusing').set('Value', 2);
hCdoConfig.Fields.Item('http://schemas.microsoft.com/cdo/configuration/smtpserver').set('Value', 'smtp.myserver.com')
hCdoConfig.Fields.Item('http://schemas.microsoft.com/cdo/configuration/smtpserverport').set('Value', 25);
hCdoConfig.Fields.Update;
mail.configuration = hCdoConfig;
More information on CDO settings (e.g. SMTP authorization) can be found in the MSDN library at http://msdn.microsoft.com/en-us/library/ms526318.aspx
4
17 Dec 2012
Kernel Density Estimator
Reliable and extremely fast kernel density estimator for one-dimensional data