connects to your default incoming mail server.
MailServerConnect["server"]
connects to the specified incoming mail server "server".
MailServerConnect["server",userid]
connects using the specified user ID userid.
MailServerConnect["server",userid,password]
connects using userid and password.


MailServerConnect
connects to your default incoming mail server.
MailServerConnect["server"]
connects to the specified incoming mail server "server".
MailServerConnect["server",userid]
connects using the specified user ID userid.
MailServerConnect["server",userid,password]
connects using userid and password.
Details and Options

- MailServerConnect returns a MailServerConnection.
- On desktop systems, MailServerConnect requires certain user mail settings. These can be defined through Preferences ▶ Internet & Mail ▶ Mail Settings in the notebook front end.
- MailServerConnect by default connects to the mail server given by $IncomingMailSettings.
- MailServerConnect will prompt for a userid and password if required.
- MailServerConnect allows the following options:
-
Authentication Automatic authentication parameters for the connection MailSettings $IncomingMailSettings mail settings to use for the connection
Examples
open all close allBasic Examples (1)
Connect to a mail server, bringing up a dialog if needed:
Connect to a mail server, using the MailSettings option:
Connect to a mail server, specifying a server only:
Connect to a mail server, specifying a "server" and userid:
Connect to a mail server, specifying a "server", userid and password:
Related Guides
Related Workflows
- Set Up the Wolfram Language to Use Email
History
Text
Wolfram Research (2018), MailServerConnect, Wolfram Language function, https://reference.wolfram.com/language/ref/MailServerConnect.html.
CMS
Wolfram Language. 2018. "MailServerConnect." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/MailServerConnect.html.
APA
Wolfram Language. (2018). MailServerConnect. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MailServerConnect.html
BibTeX
@misc{reference.wolfram_2025_mailserverconnect, author="Wolfram Research", title="{MailServerConnect}", year="2018", howpublished="\url{https://reference.wolfram.com/language/ref/MailServerConnect.html}", note=[Accessed: 13-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_mailserverconnect, organization={Wolfram Research}, title={MailServerConnect}, year={2018}, url={https://reference.wolfram.com/language/ref/MailServerConnect.html}, note=[Accessed: 13-August-2025]}