General mail questions

Swift Mailer is a fantastic library for sending email with php. Discuss this library or ask any questions about it here.

Moderators: Chris Corbyn, General Moderators

Post Reply
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

General mail questions

Post by alex.barylski »

1) I can use SwiftMailer to connect to a GMail SMTP account and use that to send the emails, correct?

2) Additionally, in looking for ways to minimize processing, bandwidth, etc...when I send a single email to multiple addresses, how many exactly can you CC?

Carbon copying as I understand it basically sends the email to multiple addresses in one go, but each recipient receives the list of emails of others who received the email?

How many emails can one a single send via CC handle? 50 or 100 or maybe more?

I'm curious to know how CC works. I'm under the impression that you send ONE email (attachments and all) to the SMTP server which then parses the headers, extracts the CC addresses and repeats the sending process on the mail server side. Most bulk emails send each email to the SMTP separately, which is the only way to avoid the multiple recipients in the mail headers?

Cheers :)
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Yes you can use Gmail but Gmail have started imposing limits which make it tough to send large volumes.

Cc recipients all get the same email yes (unlike Bcc where the headers differ). The SMTP server doesn't parse any headers though.... you should probably read up on SMTP for a more clear understanding but basically *every* time you send an email over SMTP you tell it which addresses to send to using "RCPT TO" commands. There's no limit in Swift itself for Cc recipients, but SMTP often limits the number of envelopes to 100 per email, which is what the AntiFlood plugin gets around.
alex.barylski
DevNet Evangelist
Posts: 6267
Joined: Tue Dec 21, 2004 5:00 pm
Location: Winnipeg

Post by alex.barylski »

Thanks Chris...I will read up SMTP when I have chance... :)

It's a complicated protocol...

One more question though...when you send bulk emails...the server which hosts the PHP and actually connects to an SMTP...it's possible to send a single email and have the SMTP serverand send to all recipients?
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

Hockey wrote:Thanks Chris...I will read up SMTP when I have chance... :)

It's a complicated protocol...

One more question though...when you send bulk emails...the server which hosts the PHP and actually connects to an SMTP...it's possible to send a single email and have the SMTP serverand send to all recipients?
Yes, it goes like this:

For one recipient:

MAIL FROM: <your@address.com>
RCPT TO: <recipient@address.com>
DATA
<full email with headers here>
.


For many recipients:

MAIL FROM: <your@address.com>
RCPT TO: <recipient-one@address.com>
RCPT TO: <recipient-two@address.com>
RCPT TO: <recipient-three@address.com>
DATA
<full email with headers here>
.
Post Reply