upvote
Gmail has SMTP. You can send emails with a python script…
reply
Just in case: I once enabled SMTP access to my account because I had to contact a bunch of volunteers for an event and wanted to send personalized emails instead of "Dear volunteer". GMail flagged me as a spammer, banned my account, and it took four months and the GDPR to get it back.

So if you want to use SMTP but haven't done so until now I suggest you start enabling it to "warm up" their spam detector.

reply
Suddenly enabling SMTP then sending a bunch of mail (that in all likelihood nobody wanted) on a consumer gmail account is a strong signal that your account was taken over by spammers. Google offers this feature to paid, non-gmail accounts, which have completely different abuse rules: https://support.google.com/mail/answer/12921167?hl=en

Even with a consumer account, SMTP is not a good way to do this. Script a mail merge as described in: https://developers.google.com/apps-script/samples/automation...

reply
SMTp is a fine way to do this. Why force me to put all my data in their spreadsheet system and use their scripting instead of keeping my data where it is and use the tools I already have?
reply
You're fundamentally misunderstanding what the gmail product is.
reply
deleted
reply
“You’re holding it wrong.“
reply
If you’re in the Gmail ecosystem you’ve already forfeited your data. I could ask why you would bother writing code when the mail service provides a way to do what you want without firing up a python console.
reply
Gmail's SMTP is bad. You need to create an app token that also allows IMAP access to your inbox. There's no way to create a "send only" account.

I wanted to use SMTP for automated notifications from my home monitoring system, and it was _easier_ to build a freaking Telegram bot rather than just setting up SMTP.

reply
They'll probably add rate control, though.
reply
Right, at which point this is normal anti-abuse not unlike the automation limits that already existed.
reply
I believe it'll be reputation and behavior based. Considering the size and expertise of GMail about this, no other option makes sense.
reply
I made an agent with Gmail connectors (so your agent can draft emails for you not even send) and had to go through a lengthy API OAuth Dev Verification process with Google. Completed it, and now they want me to complete an ADA-CASA AL1 (formerly Tier 2) security assessment for my application. It's a paid service through one of their partner labs.

Makes me wonder whether they don't want me doing this at all, which sucks because I built the app for Google Cloud and Gemini. Sigh.

reply
If you made it just for yourself there's no such verification right? It's because you intend to offer it to other people?
reply
First for my self then I made it for other people, hence the additional verification.
reply
If you can do it with a browser then your agent can do it with curl. I am sure that there will quickly be community-provided alternatives.
reply
How is that when javascript is required in some cases? I know deno is popular for this type of workaround, but that is for youtube.
reply
In the end your browser is just making a HTTP request. Figure out the shape of the HTTP requests the Gmail UI sends, then write a script to do it in a non-browser environment.
reply
yes as trivial as replicate arbitrary complexity obfuscated code in a script
reply
If your agent is using cdp it has full access to the calls in your session.
reply
There are much simpler ways -- look at the sibling comments.

Putting those aside: I am sure you could save the Gmail HTML/JS locally, give it to an agent, and have a Gmail client in a day

Even putting LLMs aside, people have been doing this kind of thing for a long time. Reverse engineering is not new.

reply
Or just look at the HTTP calls it makes?
reply
There isn't really any technical way to prevent it. It's just against the terms of service.
reply
Which means they can block your account and then good luck getting it back.
reply
Respectfully disagree, in part.

Folks who care about security will push Gmail to have an MCP task to send email.

People who don't care about security will either use the API or the browser, as you mention. But the first time an agent is prompt injected and substantially harms someone (esp someone famous or notable), it will be front page news.

reply
This is something I'm increasingly curious about - we're a fair way in to mass corporate adoption of agents and AI (at least in tech) and yet the number of serious real-world security incidents traced to traced to prompt injection and adjacent problems, poor MCP security etc seems to be effectively zero.

The theoretical risk seems huge, and the 'payoff' the same impacts that drive aggressive and sophisticated ransomware etc campaigns so why is not clear. Maybe people are just keeping quiet but the tenor the security industry doesn't seem to be mapping to the real world in this case and why isn't clear.

reply
> Maybe people are just keeping quiet but the tenor the security industry doesn't seem to be mapping to the real world in this case and why isn't clear.

This is often the case for security-related things. People don't think about taking pictures of their keys or their boarding pass until there are news articles about it.

reply
> the number of serious real-world security incidents traced to traced to prompt injection and adjacent problems, poor MCP security etc seems to be effectively zero.

From what I gather through a dumb RTO implementation that has me sitting in an area surrounded by our orgs security people who seem to do all their work in loud phone calls and Teams meetings, there’s a lot attributed to unexpected actions by AI agents and poor forensics around attributing those reliably to a more specific root cause.

reply
People who care about security won't connect an agent to their email in the first place
reply
Yes, but they may give their agent its own account. Now it still can’t send email.
reply
deleted
reply
Uh why would that be necessary? Can't you just use... SMTP?
reply
(Edit: SMTP or REST) for Gmail / Google Workspace. SMTP or boto3 for AWS SES. I believe Fastmail offers JMAP/IMAP/SMTP.

So yes, your agent doesn’t need an MCP to send emails when it can just use an existing protocol.

reply
Not all agents have shell/network access directly
reply
IMAP doesn’t send emails. SMTP does.
reply
That's so 1981, we are in 2026 now when we use GPUs to generate code that will prompt a swarm of agents to ~~run Chrome and Pupeeter~~ actually write an entire new browser stack, and MCP for it somehow, then ask them to write specially customized spam and bypass Turing tests and... send emails. /s
reply