From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jeremie Juste Newsgroups: gmane.emacs.help Subject: gnus with multiple mail accounts Date: Thu, 15 Oct 2020 23:32:13 +0200 Organization: Emacs is it Message-ID: <87tuuvdvky.fsf@freegnu.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11807"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 16 01:46:32 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 1kTCx5-0002yR-Pj for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 16 Oct 2020 01:46:31 +0200 Original-Received: from localhost ([::1]:46642 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kTCx4-0008G9-QO for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 15 Oct 2020 19:46:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50858) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kTB5w-0005Ch-2B for help-gnu-emacs@gnu.org; Thu, 15 Oct 2020 17:47:32 -0400 Original-Received: from mail-eopbgr140077.outbound.protection.outlook.com ([40.107.14.77]:32773 helo=EUR01-VE1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kTB5t-0004Tg-5W for help-gnu-emacs@gnu.org; Thu, 15 Oct 2020 17:47:31 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G/nD21yszLJdAvCL8/NIm3Xu/SBu4AA6jfucffRiCxXBRpU0dNRnTT6fjnevgJfupYl5g8wp6X54GDH39GypnBhEGnQY3n4pdE++OMA1XmZKGs2jXFZAhfjoQOpz9Ele+P2kBRlQ9SMGv7FpnJT4D6FFFnq3+zlOa6rpZ1S+DSSuz3AbV9wb8soJqVu8rfPAoqstzToLAChsZvmdEshoG720R1ipS5Ox7gIN4ROLoIGHA2gbTVuN2la09H6PQiL8oKwurWfMLaEUZpsS4+ePV/IRmVucG6HuA4hgiEJAxyWUOII0wL0Jf6OzDV08SNm85U+C0mBpic4z942eBsI7bA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=abiIHylYwpCzvvN7O4Fvn+Hfbpp+xtumBZvP3N/NqU4=; b=SWrHsMV+brK8xDq9YMNROU+hrINcuJfeM+hShnJbRnOw3vIpWjd9MIFX1J3xbNX1Ja6bdJjwnwDx0AYiPTmfh1OHsceraZhQ8KhU9ScH3k+I1w2XrxVrhxiyMs2AOtj7FC3NQsY2vkM/jdNwlH47xheThx7YiwBHSybzW6RvdCKpGl8y3L5hOMhwv6VNTcElVJjA9bYATszZ8dBFJk9VtMliyoA+0wLd2d3dr8PQBF3dLyqUt99VRydq05d87OCUkBwYFMaLVdt3sOwRlajp5WdpguHxvYEHisAFAuri0ieli0lOigNej/0T+mVpZJnzJngJlLpWWkaSbZyNlrTkOA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=inspiring-development.com; dmarc=pass action=none header.from=inspiring-development.com; dkim=pass header.d=inspiring-development.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=InspiringDevelopment.onmicrosoft.com; s=selector2-InspiringDevelopment-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=abiIHylYwpCzvvN7O4Fvn+Hfbpp+xtumBZvP3N/NqU4=; b=L0/DuU4RvrBIxNiLCElKXj0xHM1mzzsCNrTxAOK+ZttxIag/6obY90aYP26A6PQXJDqErNVS+c4QeHEh36JH8RQk7BPx6zosZN6d8PCLGVR8RCFOrwmEf9TnjP4dLAJBMdrJI/wMT40DAyYzcfshv15qIfDXCciad6QudgP7Wcw= Authentication-Results: gnu.org; dkim=none (message not signed) header.d=none;gnu.org; dmarc=none action=none header.from=inspiring-development.com; Original-Received: from AM6PR05MB5110.eurprd05.prod.outlook.com (2603:10a6:20b:3b::31) by AM7PR05MB6947.eurprd05.prod.outlook.com (2603:10a6:20b:1a0::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3455.22; Thu, 15 Oct 2020 21:32:21 +0000 Original-Received: from AM6PR05MB5110.eurprd05.prod.outlook.com ([fe80::952c:deeb:12e1:4b0f]) by AM6PR05MB5110.eurprd05.prod.outlook.com ([fe80::952c:deeb:12e1:4b0f%6]) with mapi id 15.20.3455.030; Thu, 15 Oct 2020 21:32:21 +0000 X-Originating-IP: [78.94.23.138] X-ClientProxiedBy: PR3P191CA0046.EURP191.PROD.OUTLOOK.COM (2603:10a6:102:55::21) To AM6PR05MB5110.eurprd05.prod.outlook.com (2603:10a6:20b:3b::31) X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from freegnu (109.22.183.24) by PR3P191CA0046.EURP191.PROD.OUTLOOK.COM (2603:10a6:102:55::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3477.22 via Frontend Transport; Thu, 15 Oct 2020 21:32:20 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 783afade-2919-45c9-fc3d-08d87151cc78 X-MS-TrafficTypeDiagnostic: AM7PR05MB6947: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8273; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nRb51FlPURODNPYcrio69EfLmsQBZ5bR4m3HHRPm3qPhlREOX6/T146zf/eI0XZITLCZOzsuzCqp/AAV9PbYuPjoNTWVlzcFy0Tvuh+X9SbErC0o7mH70Uy5+EhXxan+zRzRfZ6g4Qt0TwIy0zVXWW3ZHetu4MxT+RgfYXKPiWYjww/yrm3dIqaVghs7vhGGfPrgJz3MJ7SAYzEcBPWV08qYzC7KKffStsXBOWg8uh1A94tmqkQ1DscSDiFbx3SiqD1XJMxeujtTeRkgmDkJcRBQM1L1IiCmmYa1LgqQ/v0+UQ8pe+/OH31HQYMWCIco7I3eHoAvrYMmnZ4TFCSdnA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR05MB5110.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFS:(396003)(39830400003)(346002)(136003)(366004)(376002)(2906002)(26005)(478600001)(186003)(52116002)(8676002)(4744005)(9686003)(86362001)(8936002)(6666004)(45080400002)(316002)(66946007)(36916002)(956004)(5660300002)(66476007)(83380400001)(15650500001)(66556008)(6916009)(6486002)(6496006); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: DjlhzvYva27SgZ0AEmWZRicvT4wDK290oyClRSOdfadPNJ0uKC8UliKQZ9aEsVRRQEhJ+3dNIXHl79ezlmgAaT03SgggvXkcBvo5ml4xzoRDvoQbVQbRcDnvnJsz9VWt1QyWxFxq8ksdAwKMIOsTaQVwGiAtNf1uV/X1wuu39T1cEQx3fvDfqUUQT6ZRXjBFkw6fp+pcaNiXPV90rYPGKmW/+q/1fyN9LYtNWDlqe+Jlm0rFrvguiuNDGxSE0hG5UgdV/MN4mV9BnXGRgmXVxeKGM6kuuGvJYzT5ttJDjCfvkwsqCJhmKxRyuIqvwsueQ3xlPFYXLR0Cza609SJKke/IqEP4CbsjYZ4T35o9+A5dI/RrUhOk5S9TgBVB6ykrznrI/e3hLRpHDfFwxcxxYtH+TyGOlp4xalkhJIbZv6OUGjpJUjcgtSoiO6CLHvSuBd10Ke++/isG6gg7OXr4yiIpcQVnXu+dIUiYUyx4/j7op7dnLxbiiuFk9gxOqgHKY430Wp7K8leanAy+JrwXESwV8gAEeOjJJzT53AxypqHX8qFmL7s4fwTIxgHSv355Kvhz0r3G1IqfiUo7oXxxgBvKmkbtwpyPcQG6q8RjdWo4W8C94y2rA7I1DQvNbJt54NnWn8E3Jd7L5wpZo2HCJA== X-OriginatorOrg: inspiring-development.com X-MS-Exchange-CrossTenant-Network-Message-Id: 783afade-2919-45c9-fc3d-08d87151cc78 X-MS-Exchange-CrossTenant-AuthSource: AM6PR05MB5110.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Oct 2020 21:32:21.0445 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 697cb33e-737d-4de6-9cfe-7653729e38f4 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: UYF4xk0oTF3yuft6sC6KAj/YO6hoGUmS49J/JPUccuPpz6OOKQfkScrz0Donevtfr1rsWAzmfkXWg4cNT6axx2GnoPXjiLben7JsEu04UdA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR05MB6947 Received-SPF: pass client-ip=40.107.14.77; envelope-from=juste@inspiring-development.com; helo=EUR01-VE1-obe.outbound.protection.outlook.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/15 17:47:23 X-ACL-Warn: Detected OS = Windows NT kernel [generic] [fuzzy] X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 15 Oct 2020 19:45:55 -0400 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:124483 Archived-At: Hello, 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") but I don't know how to change the smtpmail-stream-type. So I have come up with the following function. I only need to automate it to do the right assignment depending on which group I'm in. Do you have any lead please? (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 ) )) Best regards, -- Jeremie Juste