McAfee VirusScan also acts as a firewall. Sending e-mail uses TCP/IP port 25. Since this port is commonly used by viruses to relay spam, the McAfee anti-virus software will block it by default unless it is manually disabled.
You can test this by temporarily disabling McAfee's On Demand virus scanner (Right click on the McAfee Shield, select Disable On Access Scan). VirusScan can be configured to allow outbound e-mails:
1. Open the VirusScan Console: Right Click the VirusScan shield in the system tray and select VirusScan Console...
2. Double-click the Access Protection item to open it.
3. Un-check the Prevent Mass Mailing Worms from Sending Mail rule.
4. Click OK and close the VirusScan Console.
You can now leave VirusScan enabled and send emails programmatically.