From: Kevin Smith Date: 2001-03-20T12:51:59+09:00 Subject: [ruby-talk:12903] Re: How do I send messages with SMTP with anadditional name? Minero Aoki wrote: > Tammo Freese wrote: >> Net::SMTP.start("polaris-neu.offis.uni-oldenburg.de") do |smtp| >> smtp.sendmail(msg, '"Tammo Freese" ', >> 'tammo.freese@offis.de') >> end >> >> But the From: part of the mail is always tammo.freese@offis.de, without the >> name in '"'. Is there a workaround for this? > >SMTP-From is different from From: field of email. >From: field is a content of email and SMTP-From is delivery data. >And Net::SMTP is not a message composer but (only) a sender >because composing email message is out of range for "SMTP" class. In other words, put your fancy "from" information in the From field inside your "msg". The from parameter you pass to sendmail is (I believe) just to identify yourself to the smtp server. Also, if you're doing anything significant with email, consider using the TMail lib in the RAA (I started without it, but ended up using it-- especially for the encode/decode functions). Kevin