• 周四. 4月 25th, 2024

5G编程聚合网

5G时代下一个聚合的编程学习网

热门标签

Go-Mail

admin

11月 28, 2021

Go Mail

go get gopkg.in/mail.v2

发送函数

package email

import (
	"crypto/tls"
	"fmt"

	gomail "gopkg.in/mail.v2"
)

func SendMail() {
	m := gomail.NewMessage()

	// Set E-Mail sender
	m.SetHeader("From", "[email protected]")

	// Set E-Mail receivers
	m.SetHeader("To", "[email protected]")

	// Set E-Mail subject
	m.SetHeader("Subject", "Gomail test subject")

	// Set E-Mail body. You can set plain text or html with text/html
	m.SetBody("text/plain", "This is Gomail test body")

	// Settings for SMTP server
	d := gomail.NewDialer("172.xx.xx.xx", 25, "[email protected]", "")

	// This is only needed when SSL/TLS certificate is not valid on server.
	// In production this should be set to false.
	d.TLSConfig = &tls.Config{InsecureSkipVerify: true}

	// Now send E-Mail
	if err := d.DialAndSend(m); err != nil {
		fmt.Println(err)
		panic(err)
	}

	return
}

测试发送

package email

import "testing"

func TestSendEmail(t *testing.T) {
	SendMail()

}

参考资料:https://www.loginradius.com/blog/async/sending-emails-with-golang/

《Go-Mail》有36个想法
  1. Sight Care is a daily supplement proven in clinical trials and conclusive science to improve vision by nourishing the body from within. The Sight Care formula claims to reverse issues in eyesight, and every ingredient is completely natural.

  2. Dentitox Pro is a liquid dietary solution created as a serum to support healthy gums and teeth. Dentitox Pro formula is made in the best natural way with unique, powerful botanical ingredients that can support healthy teeth.

  3. GlucoBerry is one of the biggest all-natural dietary and biggest scientific breakthrough formulas ever in the health industry today. This is all because of its amazing high-quality cutting-edge formula that helps treat high blood sugar levels very naturally and effectively.

  4. TerraCalm is an antifungal mineral clay that may support the health of your toenails. It is for those who struggle with brittle, weak, and discoloured nails. It has a unique blend of natural ingredients that may work to nourish and strengthen your toenails.

  5. GlucoTrust is a revolutionary blood sugar support solution that eliminates the underlying causes of type 2 diabetes and associated health risks.

  6. Amiclear is a dietary supplement designed to support healthy blood sugar levels and assist with glucose metabolism. It contains eight proprietary blends of ingredients that have been clinically proven to be effective.

  7. Glucofort Blood Sugar Support is an all-natural dietary formula that works to support healthy blood sugar levels. It also supports glucose metabolism. According to the manufacturer, this supplement can help users keep their blood sugar levels healthy and within a normal range with herbs, vitamins, plant extracts, and other natural ingredients.

  8. Introducing FlowForce Max, a solution designed with a single purpose: to provide men with an affordable and safe way to address BPH and other prostate concerns. Unlike many costly supplements or those with risky stimulants, we’ve crafted FlowForce Max with your well-being in mind. Don’t compromise your health or budget – choose FlowForce Max for effective prostate support today!

  9. SynoGut is an all-natural dietary supplement that is designed to support the health of your digestive system, keeping you energized and active.

  10. EyeFortin is a natural vision support formula crafted with a blend of plant-based compounds and essential minerals. It aims to enhance vision clarity, focus, and moisture balance.

  11. HoneyBurn is a 100% natural honey mixture formula that can support both your digestive health and fat-burning mechanism. Since it is formulated using 11 natural plant ingredients, it is clinically proven to be safe and free of toxins, chemicals, or additives.

  12. Herpagreens is a dietary supplement formulated to combat symptoms of herpes by providing the body with high levels of super antioxidants, vitamins

  13. Metabo Flex is a nutritional formula that enhances metabolic flexibility by awakening the calorie-burning switch in the body. The supplement is designed to target the underlying causes of stubborn weight gain utilizing a special “miracle plant” from Cambodia that can melt fat 24/7.

  14. Puravive introduced an innovative approach to weight loss and management that set it apart from other supplements. It enhances the production and storage of brown fat in the body, a stark contrast to the unhealthy white fat that contributes to obesity.

  15. Prostadine is a dietary supplement meticulously formulated to support prostate health, enhance bladder function, and promote overall urinary system well-being. Crafted from a blend of entirely natural ingredients, Prostadine draws upon a recent groundbreaking discovery by Harvard scientists.

  16. The Quietum Plus supplement promotes healthy ears, enables clearer hearing, and combats tinnitus by utilizing only the purest natural ingredients. Supplements are widely used for various reasons, including boosting energy, lowering blood pressure, and boosting metabolism.

  17. GlucoCare is a natural and safe supplement for blood sugar support and weight management. It fixes your metabolism and detoxifies your body.

  18. With its all-natural ingredients and impressive results, Aizen Power supplement is quickly becoming a popular choice for anyone looking for an effective solution for improve sexual health with this revolutionary treatment.

  19. t’s Time To Say Goodbye To All Your Bedroom Troubles And Enjoy The Ultimate Satisfaction And Give Her The Leg-shaking Orgasms. The Endopeak Is Your True Partner To Build Those Monster Powers In Your Manhood You Ever Craved For..

  20. What makes Sumatra Slim Belly Tonic even more unique is its inspiration from the beautiful Indonesian island of Sumatra. This supplement incorporates ingredients that are indigenous to this stunning island, including the exotic blue spirulina. How amazing is that? By harnessing the power of these rare and natural ingredients, Sumatra Slim Belly Tonic provides you with a weight loss solution that is both effective and enchanting.

  21. What makes Sumatra Slim Belly Tonic even more unique is its inspiration from the beautiful Indonesian island of Sumatra. This supplement incorporates ingredients that are indigenous to this stunning island, including the exotic blue spirulina. How amazing is that? By harnessing the power of these rare and natural ingredients, Sumatra Slim Belly Tonic provides you with a weight loss solution that is both effective and enchanting.

  22. What makes Sumatra Slim Belly Tonic even more unique is its inspiration from the beautiful Indonesian island of Sumatra. This supplement incorporates ingredients that are indigenous to this stunning island, including the exotic blue spirulina. How amazing is that? By harnessing the power of these rare and natural ingredients, Sumatra Slim Belly Tonic provides you with a weight loss solution that is both effective and enchanting.

  23. Glucotrust can also help to reduce food cravings. This is particularly important for those who struggle with overeating or binge eating, as it can help to reduce the urge to eat unhealthy foods and promote healthier eating habits. Overall, Glucotrust is an effective and versatile supplement that offers a range of benefits for those looking to improve their health and wellbeing. Whether you are looking to regulate your blood sugar, lose weight, or support healthy blood pressure, this supplement can help you achieve your goals.

  24. Sugar Defender’s prowess in managing blood sugar is deeply rooted in its exceptional blend of natural ingredients, each playing a distinct role that contributes to the overall success of the supplement. Here are some noteworthy positive impacts of the Sugar Defender Ingredients blend:

  25. Alpilean proudly boasts a chemical-free, stimulant-free, and preservative-free formula, ensuring a secure and natural choice for those seeking weight loss solutions. Its composition makes it a safe and wholesome option for all individuals. Moreover, seamlessly integrating Alpilean into your daily routine is a breeze, requiring just two capsules a day. Since it collaborates harmoniously with your body’s innate processes, rest assured, there’s no need to fret about undesirable side effects or the dreaded cycle of yo-yo dieting.

  26. Red Boost comes with a 180-day, 100% money-back guarantee, which means that customers have 180 days from the date of purchase to try the product and see if it works for them. Within this time frame, they can ask for a full refund if they are not happy with the results.

  27. Your posts always provide me with a new perspective and encourage me to look at things differently Thank you for broadening my horizons

  28. Metanail is an effective solution specifically formulated to combat toenail fungus and brittle nails. Its exceptional effectiveness stems from its ability to target the primary culprit behind toenail fungus, known as T. Rubrum.

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注