Skip to content

subc0der/Cali_Quakes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Cali_Quakes

USGS agent for California earthquakes

Original Prompt & Response: Don't worry! The Gmail app password setup can be confusing. Let me walk you through it step-by-step.

How Gmail App Passwords Work

The app password doesn't need to be "linked" to anything specific. It's a substitute for your regular Gmail password that works only for third-party apps (like our Python script).

Step-by-Step Gmail Setup:

1. First, verify 2-Step Verification is enabled:

  • Go to myaccount.google.com
  • Click "Security" on the left
  • Look for "2-Step Verification" - it should show "On"
  • If it's off, turn it on first

2. Generate the App Password:

  • In the same Security section, look for "App passwords"
  • Click on "App passwords"
  • You might need to sign in again
  • Select "Mail" from the dropdown (or "Other" and type "Python Script")
  • Click "Generate"
  • Google will show you a 16-character password like: abcd efgh ijkl mnop

3. Copy and Use the App Password:

  • Copy this 16-character password (including spaces, or remove them - both work)
  • This is what goes in your Python script as sender_password

Update Your Script:

email_config = {
    'smtp_server': 'smtp.gmail.com',
    'smtp_port': 587,
    'sender_email': 'youremail@gmail.com',           # Your actual Gmail address
    'sender_password': 'abcd efgh ijkl mnop',        # The 16-char app password
    'recipient_email': 'youremail@gmail.com'         # Where you want the report sent
}

Test It Quickly:

Create a simple test script first to make sure email works:## Troubleshooting Common Issues:

"App passwords" option not showing?

  • Make sure 2-Step Verification is turned ON first
  • Wait a few minutes after enabling 2-Step Verification

Authentication still failing?

  • Try the app password without spaces: abcdefghijklmnop
  • Make sure you're using your full Gmail address: username@gmail.com
  • Double-check you copied the app password correctly

Still having issues?

  • Try generating a new app password
  • Make sure you're not using your regular Gmail password

Run the test script first with your details filled in. Once that works, you'll know your email setup is correct and can use the same credentials in the main earthquake agent!

What happens when you run the test script?

About

USGS agent for California earthquakes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages