How to send mail with High priority

Discussion in 'Ruby' started by Sandy, Nov 4, 2008.

  1. Sandy

    Sandy Guest

    Hi all

    I try to send mail by net::smtp. it works fine.
    But I don't know how to send high priority mails.
    who can help me for this ?
    thanks

    sandy
     
    Sandy, Nov 4, 2008
    #1
    1. Advertising

  2. Sandy

    Heesob Park Guest

    Hi,

    2008/11/4 Sandy <>:
    > Hi all
    >
    > I try to send mail by net::smtp. it works fine.
    > But I don't know how to send high priority mails.
    > who can help me for this ?
    > thanks
    >
    > sandy
    >
    >

    Add Priority: Urgent and Importance: High headers like this:

    Net::SMTP.start('smtp.example.com', 25) do |smtp|
    smtp.open_message_stream('', ['']) do |f|
    f.puts 'Priority: Urgent'
    f.puts 'Importance: High'
    f.puts 'From: '
    f.puts 'To: '
    f.puts 'Subject: test message'
    f.puts
    f.puts 'This is a test message.'
    end
    end

    Hope this helps
    Park Heesob
     
    Heesob Park, Nov 4, 2008
    #2
    1. Advertising

  3. Heesob Park wrote:
    > Add Priority: Urgent and Importance: High headers like this:


    Which are, of course, ignored by virtually every MTA on the planet,
    since RFC 2822 does not define these headers, nor the way they should be
    handled.

    However they might be highlighted with a flag in the receiver's MUA
    though, depending on what MUA they use, and perhaps that's all you want.

    There's a list of non-standard or experimental headers you can try in
    RFC 2076 (see esp. section 3.9)
    --
    Posted via http://www.ruby-forum.com/.
     
    Brian Candler, Nov 4, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nathan Sokalski
    Replies:
    3
    Views:
    1,984
    Larry Lard
    Nov 23, 2005
  2. cwdjrxyz
    Replies:
    2
    Views:
    378
    Adrienne Boswell
    Nov 3, 2006
  3. Marcel Müller
    Replies:
    3
    Views:
    590
    Marcel Müller
    Apr 27, 2009
  4. a
    Replies:
    4
    Views:
    855
  5. aspineux
    Replies:
    0
    Views:
    241
    aspineux
    Aug 28, 2011
Loading...

Share This Page