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 (5)
Connect to a mail server, bringing up a dialog if needed:
MailServerConnect[]Connect to a mail server, using the MailSettings option:
MailServerConnect[MailSettings -> <|"IncomingMailServer" -> <|"Host" -> "mail.wl.com", "Username" -> "bob"|>|>]Connect to a mail server, specifying a server only:
MailServerConnect["mail.wl.com"]Connect to a mail server, specifying a "server" and userid:
MailServerConnect["mail.wl.com", "bob"]Connect to a mail server, specifying a "server", userid and password:
MailServerConnect["mail.wl.com", "bob", "changeme"]Options (2)
MailSettings (1)
Use MailSettings to specify credentials:
MailServerConnect["mail.wl.com", MailSettings -> <|"Username" -> "bob", "Password" -> "changeme"|>]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_2026_mailserverconnect, author="Wolfram Research", title="{MailServerConnect}", year="2018", howpublished="\url{https://reference.wolfram.com/language/ref/MailServerConnect.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_mailserverconnect, organization={Wolfram Research}, title={MailServerConnect}, year={2018}, url={https://reference.wolfram.com/language/ref/MailServerConnect.html}, note=[Accessed: 12-June-2026]}