What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Trouble sending email from PHP

Trouble sending email from PHP
Author: Message:
Jarrod
Veteran Member
*****

Avatar
woot simpson

Posts: 1304
Reputation: 20
– / Male / Flag
Joined: Sep 2006
RE: Trouble sending email from PHP
It looks like they have python setup you might be able to knock something up in python to send the mail then have your php just call the python function

example
Python code:
#!/usr/bin/env python
import cgi
import smtplib
fields=cgi.FieldStorage()
 
print "Content-Type: text/html"#the mime header
print
 
 
print """
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>sender</title>
</head><body><center>"""

 
 
 
if 'message' in fields:
    message=fields["message"].value
else:
    message=None
   
if 'to' in fields:
    to=fields["to"].value
else:
    to=None
 
 
if bool(to)==True and bool(message)==True:
    server = smtplib.SMTP('smtp.gmail.com')
    server.set_debuglevel(1)
    server.ehlo()
    server.starttls()
    server.ehlo()
    #fill in those 3 fields then you can call like email.cgi?to=address&message=test
    server.login("""~~~~~~~~gmailuser~~~~~~~""", "~~~~Gmail password~~~~~~~~~")
    server.sendmail("~~~~from address~~~~~~~~~~", to, message)
    try:
        server.quit()
    except:
        pass
 
 
print"""
</body>
</html>"""

 


This post was edited on 11-03-2009 at 09:19 PM by Jarrod.

[Image: 5344.png]
[Image: sig.png]

A.k.a. The Glad Falconer














11-03-2009 09:06 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Trouble sending email from PHP - by Spunky on 11-03-2009 at 02:33 PM
RE: Trouble sending email from PHP - by matty on 11-03-2009 at 02:54 PM
RE: Trouble sending email from PHP - by Spunky on 11-03-2009 at 03:02 PM
RE: Trouble sending email from PHP - by MeEtc on 11-03-2009 at 04:06 PM
RE: Trouble sending email from PHP - by Spunky on 11-03-2009 at 08:14 PM
RE: Trouble sending email from PHP - by Jarrod on 11-03-2009 at 09:06 PM
RE: Trouble sending email from PHP - by Spunky on 11-04-2009 at 10:45 AM
RE: Trouble sending email from PHP - by Jarrod on 11-04-2009 at 11:01 AM
RE: Trouble sending email from PHP - by Spunky on 11-04-2009 at 11:40 AM
RE: Trouble sending email from PHP - by Jarrod on 11-04-2009 at 11:46 AM
RE: Trouble sending email from PHP - by Spunky on 11-04-2009 at 12:08 PM
RE: Trouble sending email from PHP - by Jarrod on 11-04-2009 at 12:13 PM
RE: Trouble sending email from PHP - by WDZ on 11-04-2009 at 09:48 PM
RE: Trouble sending email from PHP - by Jarrod on 11-04-2009 at 10:36 PM
RE: Trouble sending email from PHP - by MeEtc on 11-05-2009 at 12:50 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On