The other 2 posters have touched on this, but just to be explicit:
- There only reason why Net::SMTP would be (more then negligably) slower then using /foo/bin/sendmail directly is if you are connecting to an SMTP host on a remote machine. In which case the lag is either in the network, or on the remote SMTP host.
- Net::SMTP determines the default SMTP host based on Net::Config, which is set at installation time.
- You can override the default SMTP host in the constructor for Net::SMTP
- Assuming you construct your Net::SMTP object using "localhost" as the SMTP host, you probably shouldn't see any noticable performance difference between if and /foo/bin/sendmail