Mail Send(ft. Sent Folder Save)
# Script/Python2024. 4. 4. 17:28Mail Send(ft. Sent Folder Save)

import smtplib import imaplib import email import time from email.utils import make_msgid from email.mime.text import MIMEText # SMTP 서버 설정 smtp_server = 'SMTP서버' smtp_port = 465 smtp_username = '사용자ID' smtp_password = '비밀번호' # IMAP 서버 설정 imap_server = 'IMAP서버' imap_port = 993 imap_username = '사용자ID' imap_password = '비밀번호' # 이메일 발신자, 수신자, 제목 및 내용 설정 from_email = '발신자 메일주소' to_email = '수신자 메일주소' ..

embed이미지 본문 첨부 메일발송 스크립트
# Script/Bash2023. 2. 16. 09:04embed이미지 본문 첨부 메일발송 스크립트

#!/bin/bash # 이메일 발신자, 수신자, 제목 및 내용 설정 from_email="sender@naver.com" from_pw="password" smtphost="smtp.naver.com" to_email="recipient@example.com" subject="Test email with embedded image" body="This is a test email with an embedded image." boundary="boundary_string" # 이미지 파일 경로 설정 image_path="/path/to/image.png" # 이메일 본문에 이미지를 추가 body_with_image="From: $from_email\r\nTo: $to_email\r\nSubject: $s..

curl smtp command
# E-Mail2022. 9. 23. 08:45curl smtp command

curl을 이용해서 메일발송. curl 버전 7.20.0 이상에서만 작동합니다. 따라서 이전 버전의 curl을 사용하고 있다면, 업그레이드하여 --mail-from 옵션을 사용할 수 있는지 확인해야 합니다. 사전에 아래처럼 발송할 내용을 파일(mailsample.txt)로 생성. from: to: subject: test mail sorry, this is test mail . 인코딩해서 발송할 경우는 헤더에 아래내용 추가해야 함. from: to: subject: test mail MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain;charset=utf-8 sorry, this is test mail. 파일을 생성했으면 ..

SMTP서버 구축(postfix)
# E-Mail2022. 6. 2. 08:40SMTP서버 구축(postfix)

라운드큐브 메일 사용을 위한 스텝1smtp인증서버 구축진행 설치환경[daraksharavim.tistory.com]$ cat /etc/redhat-releaseRocky Linux release 8.6 (Green Obsidian)설치확인[daraksharavim.tistory.com]$ rpm -qa | grep postfix없다면 설치진행[daraksharavim.tistory.com]$ yum -y install postfix상태확인[daraksharavim.tistory.com]$ systemctl status postfix● postfix.service - Postfix Mail Transport Agent Loaded: loaded (/usr/lib/systemd/system/postfix..

# Operation System/Linux2020. 10. 5. 17:06openssl command smtp(ssl) 및 imap(ssl) 접속확인

To connect using the TLS protocol on port 587, use:[darksharavim]openssl s_client -starttls smtp -connect smtp.mail.nate.com:587 smtp-ssl(465)[darksharavim]openssl s_client -connect smtp.mail.nate.com:465 imap-ssl(993)[darksharavim]openssl s_client -crlf -connect imap.nate.com:993https://stackoverflow.com/questions/14959461/how-to-talk-to-imap-server-in-shell-via-openssl How to talk to IMAP serv..

image