Can we assume that mail is configured on the customer's machine?
Are they all Linux/Unix with mail configured? If so, they should be running sendmail or something that has the same name and will accept minimal commands. If that's true, you can pipe your mail to "sendmail recipient@somewhere"
If not, the problem is that you don't know what SMTP server to use. One way to get around that is to use a program like CleanCode Email (see
CleanCode Email ) and tell it to AUTH to a server you can send through. You can do the same sort of thing in Perl using the Mail::Sendmail module.
Unfortunately, you can run into trouble there because outbound firewall rules may not let you talk to that server.
If you aren't in control of the platform, I think you have to rely on a combination of methods, having your program try sendmail, try the known server, try just using plain old "mail" or "mutt" and go on to the next if it fails. Once again, though, it's hard to know that it failed because a misconfigured system can happily accept mail and never deliver it. For that reason, I'd try to my known SMTP server first (because you CAN programmatically know if that fails).
Obviously if the mail is going to you, you don't need to auth - just connect and send.
Oh, and you mentioned a telnet script? Try wrapping telnet in "expect" for better results.