From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.help Subject: Re: gnus with multiple mail accounts Date: Fri, 16 Oct 2020 10:50:16 +0200 Message-ID: References: <87tuuvdvky.fsf@freegnu.i-did-not-set--mail-host-address--so-tickle-me> <87y2k755zr.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38441"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Eric Abrahamsen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 16 10:50:52 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kTLRs-0009sg-9k for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 16 Oct 2020 10:50:52 +0200 Original-Received: from localhost ([::1]:36296 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kTLRr-0007qY-CN for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 16 Oct 2020 04:50:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59522) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kTLRP-0007qK-JU for help-gnu-emacs@gnu.org; Fri, 16 Oct 2020 04:50:23 -0400 Original-Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:34688) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kTLRM-0007tW-Pa for help-gnu-emacs@gnu.org; Fri, 16 Oct 2020 04:50:23 -0400 Original-Received: by mail-wr1-x42d.google.com with SMTP id i1so1839222wro.1 for ; Fri, 16 Oct 2020 01:50:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:gmane-reply-to-list:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=WrjlOeSKYgp/mdaZB5hBU8wphudtmHZkhCH0xdoQibs=; b=l25h3K9LjTM2gSA9rG2YBxZtOAada1q4pLlr9VwJgEUFiHHxRVdA889QJR7ZLrxwAC pQBESMjj9Y8NXqywsdkcjVTFJh5zd6/Rq+S6xoj2xxfa/B4hS5DjFiSlzLPDyrDjpp3Q /lMpdjtmpPJK3nlk/SpY8rsOQDxcauFPAlwMnYWWHfuXjHStKMwO1mg8O9XEZpDKUCXd 83y/Td6kccubZzbK2srZ2v07xa6Y4WIU5O605v4YKV0/KDt9JT/HNE2/AWRbbhxQzbvS n8BiCACI95JQ6QYM2tCs8y9Pu/wSGf9aAtm5k4gnxSgKkpUJMqFtL72nf5ARnSTW2bca jN8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references :gmane-reply-to-list:date:in-reply-to:message-id:mime-version :content-transfer-encoding; bh=WrjlOeSKYgp/mdaZB5hBU8wphudtmHZkhCH0xdoQibs=; b=VH4NWCilEoKzyuqLCoCAM1Ofdd9n3Em3Aur7OeCykYJlrhumQWPeUCmvGicEQORNMY rxj3CdTGGnKw7IFjBbAG3Jv4NY1Mkg2hicBmSBkwub2wuIC6+wJ+CKhZDSRA0sgZKOq4 pH5Q41D9aP9TTVT+cp/89u/lB4qEKN+IMljs8g7A6+XfMZv7hbz2aD2gv8IHCPeiVfDv +z6ZQ5MpP9fOZdVQ7z5LKPnKhfjKre2q+zh8lkPjoqvlspBxBfwdVIQyBkGP6VkdDeFP PgBUzQQ2gA1H9jo0d0+lLhXC92HgQ4CmD83/RrtzM1EanbsfYKrgHccuNVKwDPIH//m1 WK0w== X-Gm-Message-State: AOAM533y3drY1/eck+vbfV86+QMhu3mwH56MZr5spBKIAPcTfsSvzA8r Rl3nZtkZyY+6+eIvveoWDALuXoBGHoCYig== X-Google-Smtp-Source: ABdhPJwLBuO4/FPb8KrO9/XNABf7usQxe5t/3rYOPkeqSnSkLhBbo7xREDpySdPRfv4I+RPi79obmA== X-Received: by 2002:adf:c3cd:: with SMTP id d13mr2637597wrg.15.1602838218281; Fri, 16 Oct 2020 01:50:18 -0700 (PDT) Original-Received: from rpluim-mac ([2a01:e34:ecfc:a860:9474:cfb2:b9a9:23d4]) by smtp.gmail.com with ESMTPSA id c132sm1896814wmf.25.2020.10.16.01.50.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Oct 2020 01:50:17 -0700 (PDT) Gmane-Reply-To-List: yes In-Reply-To: <87y2k755zr.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Thu, 15 Oct 2020 18:12:08 -0700") Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=rpluim@gmail.com; helo=mail-wr1-x42d.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:124497 Archived-At: >>>>> On Thu, 15 Oct 2020 18:12:08 -0700, Eric Abrahamsen said: Eric> Jeremie Juste writes: >> Hello, >>=20 >> I would like send mail from more than one mail account from gnus. >> I tried to use X-Message-SMTP-Method (info "(gnus) Posting Styles")= =20 >> but I don't know how to change the smtpmail-stream-type. >>=20 >>=20 >> So I have come up with the following function. I only need to automa= te >> it to do the right assignment depending on which group I'm in. Do you >> have any lead please? >>=20 >> (defun set-smtp (arg) >> "switch mail server" >> (interactive "p") >> (if (eq arg 1) >> (setq message-send-mail-function 'smtpmail-send-it >> smtpmail-default-smtp-server "smtp.office365.com" >> smtpmail-smtp-server "smtp.office365.com" >> user-mail-address "" >> smtpmail-smtp-service 587 >> smtpmail-stream-type 'starttls >> ) >> (setq message-send-mail-function 'smtpmail-send-it >> smtpmail-default-smtp-server "smtp.gmail.com" >> smtpmail-smtp-server "smtp.gmail.com" >> user-mail-address "" >> smtpmail-smtp-service 465 >> smtpmail-stream-type 'ssl >> ) >> )) Eric> Are you sure it doesn't work just to set host and port in the Eric> pseudo-header? Looking at the code, it ought to be setting Eric> `smtpmail-stream-type' correctly from the port. I assume you've t= ried Eric> that and it didn't work? That=CA=BCs a very recent change in emacs-master, and it only work if you're using the SMTP TLS transport port, which is 465. 587 is the SMTP STARTTLS submission port, and is not covered (I recommend people use 465 whenever possible). Does office365 not support port 465? Robert --=20