java发送gmail_如何在Gmail中轻松通过电子邮件发送人群

java发送gmail

java发送gmail

Mailing lists are an old tool in the email arsenal, but their implementation in Gmail isn’t immediately intuitive. Read on as we show you how to email groups using your Gmail account.

邮件列表是电子邮件库中的一个旧工具,但是在Gmail中的实现并不直观。 请继续阅读,我们将向您展示如何使用您的Gmail帐户通过电子邮件发送论坛。

Dear How-To Geek,

亲爱的How-To Geek,

I’m probably going to smack myself when you show me how easy it is, but right now I’m at a loss: how do I set up a simple mailing list in Gmail? What I want to do is make a list of people I routinely email and have some sort of shortcut, list, or anything that would let me email them all at once without having to type in all their email addresses. Even with Gmail’s suggestion feature it still takes too long and I often forget someone on the list. Surely an email service as modern and advanced as Gmail has some way to do this? I’ve looked in every menu under Settings and I can’t find a thing!

当您向我展示它有多么简单时,我可能会不屑一顾,但是现在我很茫然:如何在Gmail中设置简单的邮件列表? 我想要做的是列出我经常发送电子邮件的人员列表,并提供某种快捷方式,列表或任何可以让我立即通过电子邮件发送给所有人的东西,而不必键入他们的所有电子邮件地址。 即使使用Gmail的建议功能,它仍然需要花费很长时间,而且我经常会忘记列表中的某人。 当然,像Gmail这样先进而又先进的电子邮件服务可以通过某种方式做到这一点? 我已经在“设置”下的每个菜单中查看,但找不到任何东西!

Sincerely,

真诚的

Mailing List Blues

邮件列表蓝调

Don’t be too hard on yourself, you can look all the live long day in the Settings menu and you won’t find anything. Gmail does in fact have a mailing list function but they certainly don’t advertise it and it isn’t even, for all purposes, part of the actual Gmail system.

别太在意自己,可以在“设置”菜单中查看整天的直播,您将一无所获。 Gmail实际上确实具有邮件列表功能,但他们当然不会做广告,并且就所有目的而言,它甚至都不是实际Gmail系统的一部分。

Whether or not you use it, attached to your Gmail account is a Google Contacts account. That’s where Gmail pulls those auto-complete email address suggestions from. In order to create your mailing list you’ll need to first visit your Google Contacts account and group together the people you wish to email.

无论您是否使用它,附加到您的Gmail帐户的都是Google通讯录帐户。 这是Gmail从中提取那些自动完成的电子邮件地址建议的地方。 为了创建您的邮件列表,您需要先访问您的Google通讯录帐户,然后将希望发送电子邮件的人员分组在一起。

Head over to contacts.google.com and login if you’re not already logged into your Google account. Start the process of building your mailing list by searching for one of the contacts you wish add to your list. Alternatively, you could click New Contact and create an entry. Whether you’re using an existing entry or creating a new one, double check that there is an email associated with the contact (otherwise your email list won’t be too useful).

如果您尚未登录Google帐户,请访问contact.google.com并登录。 通过搜索要添加到列表中的联系人之一,开始构建邮件列表的过程。 或者,您可以单击新建联系人并创建一个条目。 无论您是使用现有条目还是创建新条目,请仔细检查是否有与该联系人关联的电子邮件(否则您的电子邮件列表不会太有用)。

In the entry, look for the Groups button, which looks like three little people clustered together:

在条目中,查找“组”按钮,它看起来像三个小人聚集在一起:

Click on that button to drop down your existing groups (if you’ve never used this feature, the list will be sparse and may only contain the default “My Contacts” entry). Select “Create New” at the bottom of the drop down menu.

单击该按钮可以下拉现有的组(如果您从未使用过此功能,则列表将很少,并且可能仅包含默认的“我的联系人”条目)。 选择下拉菜单底部的“新建”。

Name your new group. This name will serve as the shortcut for your email list, so name it something that will be easy to remember and/or easy to type. Upon creation the contact you’re viewing will now be associated with the group:

为您的新群组命名。 该名称将用作您的电子邮件列表的快捷方式,因此命名时应易于记住和/或键入。 创建后,您正在查看的联系人将与该组关联:

Search for the other contacts you wish to add to your mailing list. For each contact use the Groups drop down menu and, this time, select your new group name instead of creating a new one, like so:

搜索您希望添加到邮件列表中的其他联系人。 对于每个联系人,请使用“组”下拉菜单,这次选择新的组名,而不是创建一个新的组名,如下所示:

After you’ve gone through and added each of the contacts you wish to use to your new mailing list (or Group, as it is known within the Google system), you’re ready to head back to Gmail and take advantage of the shortcut associated with the group.

将所有想要使用的联系人添加到新的邮件列表(或Google系统中的“组”)之后,您就可以回到Gmail并利用快捷方式了与组关联。

In your Gmail account, compose a new email. In the email’s address slot, begin typing the group name:

在您的Gmail帐户中,撰写一封新电子邮件。 在电子邮件地址栏中,开始输入组名:

Now, one thing you might notice is that we placed our Group shortcut in the BCC slot. If you’re not emailing a small group of people who are expressly working with each other and need to be able to email back to the whole group (or other members of the group), don’t use the TO or CC slot, use the BCC. The BCC is especially important if you’re emailing a group of people that are, for all purposes, unrelated to each other (such as sending out an email to the parents of all the kids you tutor to remind them that you’ll be away during Spring Break). You can read up on the uses of CC and BCC in HTG Explains: What BCC Is and Why You’re a Terrible Person If You Don’t Use It Correctly (Or At All).

现在,您可能会注意到的一件事是,我们将“组”快捷方式放在了BCC插槽中。 如果您不是通过电子邮件发送一小组彼此明确合作的人,并且需要能够通过电子邮件发送给整个小组(或该小组的其他成员),请不要使用TO或CC插槽,请使用密件抄送。 如果要向一群互不相关的人发送电子邮件,则密件抄送(BCC)尤其重要(例如,向您辅导的所有孩子的父母发送电子邮件,提醒他们您将离开在春假期间)。 您可以在《 HTG》中阅读CC和BCC的用法说明:什么是BCC,以及如果不正确(或根本没有)使用BCC的原因

Now that you have a new group and a list of contacts associated with it, you’re ready to go!

现在您有了一个新的组以及与之关联的联系人列表,就可以开始了!



Have a pressing tech question? Shoot us an email at ask@howtogeek.com and we’ll do our best to answer it.

有紧迫的技术问题吗? 向我们发送电子邮件至ask@howtogeek.com,我们将尽力答复。

翻译自: https://www.howtogeek.com/178984/ask-htg-how-can-i-email-groups-of-people-with-gmail/

java发送gmail

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
发送企业邮箱,可以使用Java Mail API。以下是一个简单的示例代码,您可以使用它来发送邮件。 ```java import java.util.Properties; import javax.mail.*; import javax.mail.internet.*; public class SendEmail { public static void main(String[] args) { String to = "recipient@example.com"; // 收件人电子邮箱 String from = "sender@example.com"; // 发件人电子邮箱 String password = "yourpassword"; // 发件人邮箱密码 // 指定发送邮件的主机为 smtp.qq.com String host = "smtp.qq.com"; // 获取系统属性 Properties properties = System.getProperties(); // 设置邮件服务器 properties.setProperty("mail.smtp.host", host); properties.setProperty("mail.smtp.auth", "true"); // 获取默认的 Session 对象 Session session = Session.getDefaultInstance(properties, new Authenticator() { protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(from, password); } }); try { // 创建默认的 MimeMessage 对象 MimeMessage message = new MimeMessage(session); // 设置 From: 头部头字段 message.setFrom(new InternetAddress(from)); // 设置 To: 头部头字段 message.addRecipient(Message.RecipientType.TO, new InternetAddress(to)); // 设置主题 message.setSubject("测试邮件"); // 设置消息体 message.setText("这是一封测试邮件。"); // 发送消息 Transport.send(message); System.out.println("邮件已经发送。"); } catch (MessagingException mex) { mex.printStackTrace(); } } } ``` 请注意,您需要将以下变量替换为您的实际值: - to:收件人的电子邮件地址 - from:发件人的电子邮件地址 - password:发件人的电子邮件密码 - host:SMTP服务器主机名(例如,如果您使用Gmail,则为“smtp.gmail.com”) 此外,请确保在运行此代码之前,在您的计算机上安装了Java Mail API。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值