info-gnus-english
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Replace, insert or append Bcc header based on Subject field.


From: Abramov Aleksey
Subject: Re: Replace, insert or append Bcc header based on Subject field.
Date: Tue, 11 Sep 2012 20:44:58 +0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (berkeley-unix)

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Abramov Aleksey <levenson@mmer.org> writes:
>
>>      ((header "Subject" "Ticket#")
>>       (bcc (concat
>>             (gnus-with-article-buffer
>>               (mail-fetch-field "bcc" nil t)) " ,"
>>             (bbdb-full-address "support@my.domain.ru"))))))
>> Where is my mistake? Any suggestions are welcome.
>
> Is there really a Bcc header in the article buffer?  That's kinda
> surprising, since the point of the Bcc header is that it's "blind",
> i.e., it's never seen by the recipient.

No, there should be no one bcc header in the original article. Bcc
header have to be set by myself twice. And at the second time it ?have?
to be found by `mail-fetch-field'. 

But in any case, this is my solution to my problem:

#+begin_src emacs-lisp
(setq gnus-posting-styles
      '((".*"
         (name "Abramov Aleksey")
         (address "levenson@mmer.org")
         (signature "Sincerely,\nAbramov Aleksey."))
        ("^nnimap\\+aabramov"
         (name "Aleksey Abramov")
         (address "Aleksey Abramov <a.abramov@my.domain.ru>")
         (organization "Skytel")
         (bcc (bbdb-full-address "a.abramov@my.domain.ru"))
         (signature-file "~/emacs-config/mail-signature.work"))
        ("^nnimap\\+localhost"
         (address "alex@smart.my.domain.ru"))
        ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
        ;; Header replacement
        (to (with-current-buffer gnus-article-buffer
              (if (string-match "otrs@otrs.my.domain.ru" (message-fetch-field 
"from"))
                  "support@my.domain.ru"
                (message-fetch-field "from"))))
        (bcc  (with-current-buffer gnus-article-buffer
                (if (string-match "otrs@otrs.my.domain.ru" (message-fetch-field 
"from"))
                    "a.abramov@my.domain.ru"
                  (format "%s, %s" "a.abramov@my.domain.ru" 
"support@my.domain.ru"))))))
#+end_src

-- 
Sincerely,
Abramov Aleksey.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]