ubuntu使用mailx利用SMTP发送邮件
转载:http://www.blogjava.net/jasmine214--love/archive/2010/10/09/334102.htmlLinux下mail利用外部邮箱发送邮件的方法:
1、下载安装mailx
sudo apt-get install heirloom-mailx
2、修改/etc/nail.rc (/etc/mail.rc)
set from=username@domain.com smtp=smtp.domain.com
set smtp-auth-user=username smtp-auth-password=password
set smtp-auth=login
eg:
set from=tiny@163.com smtp=smtp.163.com
set smtp-auth-user=tiny smtp-auth-password=123456
set smtp-auth=login
说明:
from是发送的邮件地址
smtp是发生的外部smtp服务器的地址
smtp-auth-user是外部smtp服务器认证的用户名
smtp-auth-password是外部smtp服务器认证的用户密码
smtp-auth是邮件认证的方式
配置成功后,就可以使用了
可以发送一封邮件测试一下:
mail -s "test" user@sohu.com <content.txt 其中-s后面的是邮件标题,user@sohu.com是收件人地址,content.txt里面是邮件正文
ubuntu使用mailx利用SMTP发送邮件的更多相关文章
- CentOS7 配置Mailx使用SMTP发送邮件
mail.mailx和sendmail介绍: mail是mailx的别名,最初叫nail(与arch linux目前用的S-nail基因相同):mail是Heirloom的一个子项目.sendmail ...
- php利用smtp发送邮件
PHP : 5.6.8 email工具类下载地址: http://files.cnblogs.com/files/rhythmK/email.class.zip 发送邮件代码如下: require_o ...
- python 利用smtp发送邮件,html格式
def send_mail(to_list, sub, context):#sentmail to the maillist ''' to_list: 发送给谁 sub: 主题 context: 内容 ...
- python利用smtp发送邮件
#!/usr/bin/env python # -*- encoding: utf-8 -*- # author:IversOn5 import requests import json import ...
- 夹缝中求生存-在一无所有的php虚拟主机环境下利用smtp发送邮件(二)
夹缝中求生存 前言:在上一篇随笔中,以163个人邮箱作为发送邮箱地址,当收件邮箱为QQ邮箱时,极有可能会被直接扔进邮件垃圾箱里,为了解决这个问题,申请注册企业邮箱,可以减少发出的邮件被当作垃圾邮件的可 ...
- 利用JavaMail发送邮件:smtp.163.com
一.利用JavaMail发送邮件案例: 1.maven项目结构: 2.先在pom.xml里边加入Javamail依赖,系统会根据坐标自动下载mail包(前提是配置好了maven): 3.配置email ...
- C#利用SMTP服务器发送邮件
使用.net(C#)发送邮件学习手册(带成功案例) 1.了解发送邮件的三种方式 2.实例介绍使用client.DeliveryMethod = System.Net.Mail.SmtpDelivery ...
- java利用commons-email发送邮件并进行封装
本例中利用commons-email发送邮件并进行封装,支持html内容和附件:Commons Email是Apache的Commons子项目下的一个邮件客户端组件,它是基于JavaMail的,大大简 ...
- php利用smtp类轻松的发送电子邮件
当你还在纠结php内置的mail()函数不能发送邮件时,那么你现在很幸运,此时的这篇文章可以帮助到你! php利用smtp类来发邮件真是屡试不爽,我用过很久了,基本上没出过问题.本博客后台,当博主回复 ...
随机推荐
- Dynamics AX 2012 R2 Business Connector Error
6.0: AxCryptoClient - New encryption key created 6.0: Unable to InitializeSession. 6.0: No built-in ...
- UINavigationController侧滑滑动返回 卡死问题
UINavigationController滑动返回,有需要的朋友可以参考下. 最近做了UINavigationController的滑动返回(IOS7及以后系统默认支持的), 主要分成以下几步以及碰 ...
- Postgres-XL介绍
一.什么是Postgres-XL XL的意思是:eXtensible Lattice,可以扩展的格子,即将PostgreSQL应用在多机器上的分布式数据库的形象化表达. Postgres-XL 是一个 ...
- 训练集(train set) 验证集(validation set) 测试集(test set)
转自:http://www.cnblogs.com/xfzhang/archive/2013/05/24/3096412.html 在有监督(supervise)的机器学习中,数据集常被分成2~3个, ...
- StringComparison枚举
public enum StringComparison { CurrentCulture, CurrentCultureIgnoreCase, InvariantCulture, Invariant ...
- Mac环境下用Java(Sikuli+Robot)实现页游自动化
转载请注明出自天外归云的博客园:http://www.cnblogs.com/LanTianYou/ Sikulix(以前叫Sikuli)在Mac电脑的环境配置步骤如下: 1.从官网上下载Sikuli ...
- uva 10673 Play with Floor and Ceil
Problem APlay with Floor and CeilInput: standard inputOutput: standard outputTime Limit: 1 second Th ...
- Android开发之获取本地视频和获取自拍视频
1.获取本地所有视频 public void getLoadMedia() { Cursor cursor = UILApplication.instance.getApplicationContex ...
- 2016年10月16日 星期日 --出埃及记 Exodus 18:27
2016年10月16日 星期日 --出埃及记 Exodus 18:27 Then Moses sent his father-in-law on his way, and Jethro returne ...
- 2016年6月24日 星期五 --出埃及记 Exodus 14:21
2016年6月24日 星期五 --出埃及记 Exodus 14:21 Then Moses stretched out his hand over the sea, and all that nigh ...