Sending email via PHP: "unknown sender" says gMail?...
Hi all
I am having an issue with email I send through a form, using
php.
The email is sent and everything works fine, except that the
sender is not correctly identified:
gMail lists the email sender as "(unknown sender)", while
other email programs list it as
"[email protected]", which is the account name of the
hosting company...
here's my headers declaration in PHP:
$headers = 'Content-type: text/html;
charset=iso-8859-1'."\r\n";
$headers .= 'To: '.$to."\r\n";
$headers .= 'From: Price Quote Request
<[email protected]>'."\r\n";
$subject = 'Quote Request from MoMAcorporategifts.org
('.date('m.d.y').')';
I assumed that the From line would take care of this, bbut
apparently not...
How can I solve this?
seb ( [email protected])
http://webtrans1.com | high-end web
design
An Ingenious WebSite Builder:
http://sitelander.com
Joe Makowiec wrote:
> On 25 Jul 2007 in macromedia.dreamweaver, (_seb_) wrote:
>
>> Hi all
>>
>> I am having an issue with email I send through a
form, using php.
>>
>> The email is sent and everything works fine, except
that the sender
>> is not correctly identified: gMail lists the email
sender as
>> "(unknown sender)", while other email programs list
it as
>> "[email protected]", which is the account
name of the
>> hosting company...
>>
>> here's my headers declaration in PHP:
>>
>> $headers = 'Content-type: text/html;
charset=iso-8859-1'."\r\n";
>> $headers .= 'To: '.$to."\r\n";
>> $headers .= 'From: Price Quote Request
>> <[email protected]>'."\r\n"; $subject =
'Quote Request from
>> MoMAcorporategifts.org ('.date('m.d.y').')';
>>
>> I assumed that the From line would take care of
this, bbut
>> apparently not...
>>
>> How can I solve this?
>
> Assuming that your mail function is set up correctly,
there are two
> things which look kinda off to me:
> - You're using \r\n in the strings; I've only ever used
newline (\n),
> and that's what the manual calls for
> - If you're setting the function up correctly, you have
two 'to'
> headers (one in the mail function where it belongs; one
in the added
> headers). mail() takes three to five parameters:
>
> bool mail ( string $to, string $subject, string $message
[, string
> $additional_headers [, string $additional_parameters]] )
>
> If you include 'To' in additional_headers, it may well
confuse the
> server.
>
>
http://www.php.net/manual/en/function.mail.php
>
I ALWAYS use \r\n for line feeds, for cross-platfrom
compatibility (Windows use \n and ignore \r,
Macs use \r\n)
I tried removing the "to:" from the header, gMail still
displays the received email as "unknown sender"
seb ( [email protected])
http://webtrans1.com | high-end web
design
An Ingenious WebSite Builder:
http://sitelander.com
Similar Messages
-
Webserver on DMZ cannot send email via php script using SMTP (cisco firewall pix 515e)
Hello,
I have two web servers that are sitting in a DMZ behind a Cisco Firewall PIX 515e. The webservers appear to be configured correctly as our website and FTP website are up. On two of our main website, we have two contact forms that use a simple html for to call a php script that uses smtp as its mailing protocol. Since, I am not the network administrator, I don't quite understand how to read the current configurations on the firewall, but I suspect that port 25 is blocked, which prevents the script from actually working or sending out emails. What I've done to narrow the problem done is the following: I used a wamp server to test our scripts with our smtp servers settings, was able to successfully send an email out to both my gmail and work place accounts. Currently, we have backupexec loaded on both of these servers, and when I try to send out an alert I never receive it. I think because port 25 is closed on both of those servers. I will be posting our configuration. if anyone can take a look and perhaps explain to me how I can change our webservers to communicate and successfully deliver mail via that script, I would gladly appreciate it. our IP range is 172.x.x.x, but it looks like our webservers are using 192.x.x.x with NAT in place. Please someone help.
Thanks,
Jeff Mateo
PIX Version 6.3(4)
interface ethernet0 100full
interface ethernet1 100full
interface ethernet2 100full
nameif ethernet0 outside security0
nameif ethernet1 inside security100
nameif ethernet2 DMZ security50
enable password GFO9OSBnaXE.n8af encrypted
passwd GFO9OSBnaXE.n8af encrypted
hostname morrow-pix-ct
domain-name morrowco.com
clock timezone EST -5
clock summer-time EDT recurring
fixup protocol dns maximum-length 512
fixup protocol ftp 21
fixup protocol h323 h225 1720
fixup protocol h323 ras 1718-1719
fixup protocol http 80
fixup protocol rsh 514
fixup protocol rtsp 554
fixup protocol sip 5060
fixup protocol sip udp 5060
fixup protocol skinny 2000
no fixup protocol smtp 25
fixup protocol sqlnet 1521
fixup protocol tftp 69
names
name 12.42.47.27 LI-PIX
name 172.20.0.0 CT-NET
name 172.23.0.0 LI-NET
name 172.22.0.0 TX-NET
name 172.25.0.0 NY-NET
name 192.168.10.0 CT-DMZ-NET
name 1.1.1.1 DHEC_339849.ATI__LEC_HCS722567SN
name 1.1.1.2 DHEC_339946.ATI__LEC_HCS722632SN
name 199.191.128.105 web-dns-1
name 12.127.16.69 web-dns-2
name 12.3.125.178 NY-PIX
name 64.208.123.130 TX-PIX
name 24.38.31.80 CT-PIX
object-group network morrow-net
network-object 12.42.47.24 255.255.255.248
network-object NY-PIX 255.255.255.255
network-object 64.208.123.128 255.255.255.224
network-object 24.38.31.64 255.255.255.224
network-object 24.38.35.192 255.255.255.248
object-group service morrow-mgmt tcp
port-object eq 3389
port-object eq telnet
port-object eq ssh
object-group network web-dns
network-object web-dns-1 255.255.255.255
network-object web-dns-2 255.255.255.255
access-list out1 permit icmp any any echo-reply
access-list out1 permit icmp object-group morrow-net any
access-list out1 permit tcp any host 12.193.192.132 eq ssh
access-list out1 permit tcp any host CT-PIX eq ssh
access-list out1 permit tcp any host 24.38.31.72 eq smtp
access-list out1 permit tcp any host 24.38.31.72 eq https
access-list out1 permit tcp any host 24.38.31.72 eq www
access-list out1 permit tcp any host 24.38.31.70 eq www
access-list out1 permit tcp any host 24.38.31.93 eq www
access-list out1 permit tcp any host 24.38.31.93 eq https
access-list out1 permit tcp any host 24.38.31.93 eq smtp
access-list out1 permit tcp any host 24.38.31.93 eq ftp
access-list out1 permit tcp any host 24.38.31.93 eq domain
access-list out1 permit tcp any host 24.38.31.94 eq www
access-list out1 permit tcp any host 24.38.31.94 eq https
access-list out1 permit tcp any host 24.38.31.71 eq www
access-list out1 permit tcp any host 24.38.31.71 eq 8080
access-list out1 permit tcp any host 24.38.31.71 eq 8081
access-list out1 permit tcp any host 24.38.31.71 eq 8090
access-list out1 permit tcp any host 24.38.31.69 eq ssh
access-list out1 permit tcp any host 24.38.31.94 eq ftp
access-list out1 permit tcp any host 24.38.31.92 eq 8080
access-list out1 permit tcp any host 24.38.31.92 eq www
access-list out1 permit tcp any host 24.38.31.92 eq 8081
access-list out1 permit tcp any host 24.38.31.92 eq 8090
access-list out1 permit tcp any host 24.38.31.93 eq 3389
access-list out1 permit tcp any host 24.38.31.92 eq https
access-list out1 permit tcp any host 24.38.31.70 eq https
access-list out1 permit tcp any host 24.38.31.74 eq www
access-list out1 permit tcp any host 24.38.31.74 eq https
access-list out1 permit tcp any host 24.38.31.74 eq smtp
access-list out1 permit tcp any host 24.38.31.75 eq https
access-list out1 permit tcp any host 24.38.31.75 eq www
access-list out1 permit tcp any host 24.38.31.75 eq smtp
access-list out1 permit tcp any host 24.38.31.70 eq smtp
access-list out1 permit tcp any host 24.38.31.94 eq smtp
access-list dmz1 permit icmp any any echo-reply
access-list dmz1 deny ip any 10.0.0.0 255.0.0.0
access-list dmz1 deny ip any 172.16.0.0 255.240.0.0
access-list dmz1 deny ip any 192.168.0.0 255.255.0.0
access-list dmz1 permit ip any any
access-list dmz1 deny ip any any
access-list nat0 permit ip CT-NET 255.255.0.0 192.168.220.0 255.255.255.0
access-list nat0 permit ip host 172.20.8.2 host 172.23.0.2
access-list nat0 permit ip CT-NET 255.255.0.0 LI-NET 255.255.0.0
access-list nat0 permit ip CT-NET 255.255.0.0 NY-NET 255.255.0.0
access-list nat0 permit ip CT-NET 255.255.0.0 TX-NET 255.255.0.0
access-list vpn-split-tun permit ip CT-NET 255.255.0.0 192.168.220.0 255.255.255
.0
access-list vpn-split-tun permit ip CT-DMZ-NET 255.255.255.0 192.168.220.0 255.2
55.255.0
access-list vpn-dyn-match permit ip any 192.168.220.0 255.255.255.0
access-list vpn-ct-li-gre permit gre host 172.20.8.2 host 172.23.0.2
access-list vpn-ct-ny permit ip CT-NET 255.255.0.0 NY-NET 255.255.0.0
access-list vpn-ct-ny permit ip CT-DMZ-NET 255.255.255.0 NY-NET 255.255.0.0
access-list vpn-ct-tx permit ip CT-NET 255.255.0.0 TX-NET 255.255.0.0
access-list vpn-ct-tx permit ip CT-DMZ-NET 255.255.255.0 TX-NET 255.255.0.0
access-list static-dmz-to-ct-2 permit ip host 192.168.10.141 CT-NET 255.255.248.
0
access-list nat0-dmz permit ip CT-DMZ-NET 255.255.255.0 192.168.220.0 255.255.25
5.0
access-list nat0-dmz permit ip CT-DMZ-NET 255.255.255.0 LI-NET 255.255.0.0
access-list nat0-dmz permit ip CT-DMZ-NET 255.255.255.0 NY-NET 255.255.0.0
access-list nat0-dmz permit ip CT-DMZ-NET 255.255.255.0 TX-NET 255.255.0.0
access-list static-dmz-to-ct-1 permit ip host 192.168.10.140 CT-NET 255.255.248.
0
access-list static-dmz-to-li-1 permit ip CT-DMZ-NET 255.255.255.0 CT-NET 255.255
.248.0
access-list vpn-ct-li permit ip CT-NET 255.255.0.0 LI-NET 255.255.0.0
access-list vpn-ct-li permit ip CT-DMZ-NET 255.255.255.0 LI-NET 255.255.0.0
access-list vpn-ct-li permit ip host 10.10.2.2 host 10.10.1.1
access-list in1 permit tcp host 172.20.1.21 any eq smtp
access-list in1 permit tcp host 172.20.1.20 any eq smtp
access-list in1 deny tcp any any eq smtp
access-list in1 permit ip any any
access-list in1 permit tcp any any eq smtp
access-list cap4 permit ip host 172.20.1.82 host 192.168.220.201
access-list cap2 permit ip host 172.20.1.82 192.168.220.0 255.255.255.0
access-list in2 deny ip host 172.20.1.82 any
access-list in2 deny ip host 172.20.1.83 any
access-list in2 permit ip any any
pager lines 43
logging on
logging timestamp
logging buffered notifications
logging trap notifications
logging device-id hostname
logging host inside 172.20.1.22
mtu outside 1500
mtu inside 1500
mtu DMZ 1500
ip address outside CT-PIX 255.255.255.224
ip address inside 172.20.8.1 255.255.255.0
ip address DMZ 192.168.10.1 255.255.255.0
ip audit info action alarm
ip audit attack action alarm
ip local pool ctpool 192.168.220.100-192.168.220.200
ip local pool ct-thomson-pool-201 192.168.220.201 mask 255.255.255.255
pdm history enable
arp timeout 14400
global (outside) 1 24.38.31.81
nat (inside) 0 access-list nat0
nat (inside) 1 CT-NET 255.255.0.0 2000 10
nat (DMZ) 0 access-list nat0-dmz
static (inside,DMZ) CT-NET CT-NET netmask 255.255.0.0 0 0
static (inside,outside) 24.38.31.69 172.20.8.2 netmask 255.255.255.255 0 0
static (DMZ,outside) 24.38.31.94 192.168.10.141 netmask 255.255.255.255 0 0
static (inside,outside) 24.38.31.71 172.20.1.11 dns netmask 255.255.255.255 0 0
static (DMZ,outside) 24.38.31.93 192.168.10.140 netmask 255.255.255.255 0 0
static (DMZ,inside) 24.38.31.93 access-list static-dmz-to-ct-1 0 0
static (DMZ,inside) 24.38.31.94 access-list static-dmz-to-ct-2 0 0
static (inside,outside) 24.38.31.92 172.20.1.56 netmask 255.255.255.255 0 0
static (DMZ,outside) 24.38.31.91 192.168.10.138 netmask 255.255.255.255 0 0
static (DMZ,outside) 24.38.31.90 192.168.10.139 netmask 255.255.255.255 0 0
static (inside,outside) 24.38.31.72 172.20.1.20 netmask 255.255.255.255 0 0
static (inside,outside) 24.38.31.73 172.20.1.21 netmask 255.255.255.255 0 0
static (inside,outside) 24.38.31.70 172.20.1.91 netmask 255.255.255.255 0 0
static (DMZ,outside) 24.38.31.88 192.168.10.136 netmask 255.255.255.255 0 0
static (DMZ,outside) 24.38.31.89 192.168.10.137 netmask 255.255.255.255 0 0
static (inside,outside) 24.38.31.74 172.20.1.18 netmask 255.255.255.255 0 0
static (inside,outside) 24.38.31.75 172.20.1.92 netmask 255.255.255.255 0 0
access-group out1 in interface outside
access-group dmz1 in interface DMZ
route outside 0.0.0.0 0.0.0.0 24.38.31.65 1
route inside 10.10.2.2 255.255.255.255 172.20.8.2 1
route inside CT-NET 255.255.248.0 172.20.8.2 1
timeout xlate 3:00:00
timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 rpc 0:10:00 h225 1:00:00
timeout h323 0:05:00 mgcp 0:05:00 sip 0:30:00 sip_media 0:02:00
timeout uauth 0:05:00 absolute
aaa-server TACACS+ protocol tacacs+
aaa-server TACACS+ max-failed-attempts 3
aaa-server TACACS+ deadtime 10
aaa-server RADIUS protocol radius
aaa-server RADIUS max-failed-attempts 3
aaa-server RADIUS deadtime 10
aaa-server LOCAL protocol local
aaa-server ct-rad protocol radius
aaa-server ct-rad max-failed-attempts 2
aaa-server ct-rad deadtime 10
aaa-server ct-rad (inside) host 172.20.1.22 morrow123 timeout 7
aaa authentication ssh console LOCAL
aaa authentication http console LOCAL
aaa authentication serial console LOCAL
aaa authentication telnet console LOCAL
http server enable
http 173.220.252.56 255.255.255.248 outside
http 65.51.181.80 255.255.255.248 outside
http 208.65.108.176 255.255.255.240 outside
http CT-NET 255.255.0.0 inside
no snmp-server location
no snmp-server contact
snmp-server community m0rroW(0
no snmp-server enable traps
floodguard enable
sysopt connection permit-ipsec
sysopt connection permit-pptp
crypto ipsec transform-set 3des-sha esp-3des esp-sha-hmac
crypto ipsec transform-set 3des-md5 esp-3des esp-md5-hmac
crypto dynamic-map dyn_map 20 match address vpn-dyn-match
crypto dynamic-map dyn_map 20 set transform-set 3des-sha
crypto map ct-crypto 10 ipsec-isakmp
crypto map ct-crypto 10 match address vpn-ct-li-gre
crypto map ct-crypto 10 set peer LI-PIX
crypto map ct-crypto 10 set transform-set 3des-sha
crypto map ct-crypto 15 ipsec-isakmp
crypto map ct-crypto 15 match address vpn-ct-li
crypto map ct-crypto 15 set peer LI-PIX
crypto map ct-crypto 15 set transform-set 3des-sha
crypto map ct-crypto 20 ipsec-isakmp
crypto map ct-crypto 20 match address vpn-ct-ny
crypto map ct-crypto 20 set peer NY-PIX
crypto map ct-crypto 20 set transform-set 3des-sha
crypto map ct-crypto 30 ipsec-isakmp
crypto map ct-crypto 30 match address vpn-ct-tx
crypto map ct-crypto 30 set peer TX-PIX
crypto map ct-crypto 30 set transform-set 3des-sha
crypto map ct-crypto 65535 ipsec-isakmp dynamic dyn_map
crypto map ct-crypto client authentication ct-rad
crypto map ct-crypto interface outside
isakmp enable outside
isakmp key ******** address LI-PIX netmask 255.255.255.255 no-xauth no-config-mo
de
isakmp key ******** address 216.138.83.138 netmask 255.255.255.255 no-xauth no-c
onfig-mode
isakmp key ******** address NY-PIX netmask 255.255.255.255 no-xauth no-config-mo
de
isakmp key ******** address TX-PIX netmask 255.255.255.255 no-xauth no-config-mo
de
isakmp identity address
isakmp nat-traversal 20
isakmp policy 10 authentication pre-share
isakmp policy 10 encryption 3des
isakmp policy 10 hash sha
isakmp policy 10 group 2
isakmp policy 10 lifetime 86400
isakmp policy 20 authentication pre-share
isakmp policy 20 encryption 3des
isakmp policy 20 hash md5
isakmp policy 20 group 2
isakmp policy 20 lifetime 86400
isakmp policy 30 authentication pre-share
isakmp policy 30 encryption 3des
isakmp policy 30 hash md5
isakmp policy 30 group 1
isakmp policy 30 lifetime 86400
vpngroup remotectusers address-pool ctpool
vpngroup remotectusers dns-server 172.20.1.5
vpngroup remotectusers wins-server 172.20.1.5
vpngroup remotectusers default-domain morrowny.comAmit,
I applaud your creativity in seeking to solve your problem, however, this sounds like a real mess in the making. There are two things I don't like about your approach. One, cron -> calling Java -> calling PHP -> accessing database, it's just too many layers, in my opinion, where things can go wrong. Two it seems to me that you are exposing data one your website (with the PHP) that you may not want expose and this is an important consideration when you are dealing with emails and privacy and so on.
I think the path of least resistance would be to get a new user account added to the MySQL database that you can access remotely with your Java program. This account can be locked down for read only access and be locked down to the specific IP or IP range that your Java program will be connecting from.
Again I applaud your creativity but truly this seems like a hack because of the complexity and security concerns you are introducing and I think is a path to the land of trouble. Hopefully you will be able to get a remote account set up. -
Gmail taking ages to send email via mail app
I bought a MacBook air yesterday and set up my gmail account on the mail app. Everything seemed to be working okay at first but now it's takkng at least five minutes to send a plain text email, one email I tried sending last night didn't send until this morning! I tried changing the SSL port to 25, 465 and 587 not only do they not work but then it stops my mail from moving into the folders or trash, they move and then go back to my inbox.
Please help!Stephen Schulte2 wrote:
When I am in a hotel out of town or overseas- or just anywhere where I don't have my home ISP - how can I not only RECEIVE but also SEND eMail via my Mail program?
If your ISP is like mine, it authenticates you for outgoing e-mail by being able to determine that you're accessing the Internet from within their network. If your ISP is so configured, they'll offer the ability to authenticate to their SMTP server with a password. My ISP does not.
However, MobileMe does provide its own authenticating SMTP server that you should be able to use from anywhere. Try an SMTP server of smtp.mac.com (smtp.me.com will probably also work) with settings of "Use default ports", "Use Secure Sockets Layer (SSL)", and "Authentication" by password, your "User Name" the part of your MobileMe ID before the "at" sign, and your password your MobileMe password.
For non-MobileMe outgoing e-mail, you'll need to locate an SMTP server that you can use.
Also: Anyway to attach more than 1 file (say photo) at a time using MobileMe and my mail account? For 22 small photos do I have to hit attach each time? I can't seem to select the folder they are in and get all 22 to attach...
I haven't tried that, but I would expect to have to attach them one at a time. -
Have just installed ios8 on our iPad. Can no longer send emails via Hotmail. BT email says that if can't work on this device.
When will these faults be fixed?does it error out or does it just not go through?
have you tried to delete and then re-add your hotmail address? Using the outlook preset -
I can't send emails via mail. I can receive but not send. I have set up gmail on mail. Any ideas? No problems with the set up previously to this.
Go to Mail Preferences- Accounts and confirm you are providing Gmail what they require to send and receive mail. And DON'T specify Secure Socket Layer. Some mail accts don't like SSL
Good Luck to you. -
Sending email via Gmail causes the file to be stored in two Sent folders
Hi there,
I've just set up Mac Mail to synchronise my Gmail account via IMAP and all is well except: when I send an email it appears in the "Sent" folder of my regular account AND the "Sent" folder of Gmail. How can this be? When I send the email, it is sent using my Gmail address, so I would have thought that the message would have been routed just to my Gmail sent folder... not to my regular sent folder as well.
Thoughts?
Cheers,
-CI'm having the same problem on a home PC running Windows 7 64-bit SP1 and Office 2010 but I'm not running Norton. Started with one of dozen or so .PST files I have for various accounts. The first "...the file so that..." folder has no properties
and I couldn't delete it. Subsequent "...the file so that..." (those with .1 and .2, etc) I could delete. Thought I had the problem solved by simply creating a new .PST file and moving all my mail from the affected. PST file and closing the affected
one. That worked for a couple of days but I notice this morning I have the same thing in a completely different .PST file.
Again, I don't use Norton and have been using the same add-ins for quite some time but this just started in the last couple of weeks.
DaleM -
How do I get videos that I recorded off of my iPhone so I can upload them to Facebook? I cannot send them via email nor MMS because it says they're too big.
iTunes is not used to move photos and videos from an iPhone to a computer (it is used to move them the other direction).
Also note that a connected phone or camera does not show in the Finder on a Mac. It should show in Image Capture or iPhoto.
The following has instructions on how to move them: iOS: Import personal photos and videos from iOS devices to your computer
Another option is 3rd party software such as http://www.photosync-app.com -
Unable to send out emails via outlook express since 06/29/2010
Task '[email protected]" - Sending' reported error (0x80042109) : 'Outlook is unable to connect to your outgoing (SMTP) e-mail server. If you continue to receive this message, contact your server administrator or Internet service provider (ISP).' This is a copy/paste of error message from Office Outlook 2003
Our household has been unable to "send" outgoing emails since 06/29/2010. This includes a wireless laptop and a PC. We both lost the ability to send emails same day. We changed NOTHING and did not share emails with each other that would have corrupted our system. During this time I have had 2 Verizon techs dance around in the PC doing all the same things I did as well as what the automated assistant did. The last tech said the Outlook Express 6.0 was corrupted, and to unistall it and then reinstall; this time 2 hours later, I think he just gave up). That did not work either. I tried using the Outlook Office and still got an error message for outging. Everything is set up as it was when it was working until 06/29/2010. I was told that there was a new server being installed and that things wold be working by 07/02/2010... I have tried taking down the firewall, turning off virus protection (McAfee), changing from outgoing.yahoo.verizon.net to just outgoing.verizon.net, checking boxes, unchecked boxes. SMPT is set to 587. We get incoming fine. I hate using the "Verizon email site" as too much monkey motion to get to mail, but that's what we have been doing. I even tried setting up a GMail account, again got mail still could not send. Any ideas?Thank you for your response! I even tried sending an email via dos prompt with Telnet, got past "HELO", but when trying to get a "RCPT TO" (using outgoing.yahoo.verizon.net) I got an "authorization required" response and then was dropped. I have been passed around without a solution. I am about ready to change ISP, but really hate to as most of the time (years now) this has been a decent ISP. If Verizon is having a problem just say so, I can handle it, honesty would be nice, refreshing and not wasting so much of my time as well as the techs!
-
My CEO has an ipad2 and I set it up w/ AOL. She cannot send any email via her AOL account from her iPad. She gets a message that says "A copy has been placed in your Outbox. Sending the message content to the server failed." We've tried it on wifi and on 3G (Verizon version). I've removed the account and added it, I've tried setting it up as an IMAP account vs. using Apples standard AOL mail setting and nothing seems to work. The SMTP settings are smtp.aol.com, port 587. I've tried adding an alternate server/smtp, but I haven't been able to find anything that works. Any advice or other people having this issue? It works fine sending an email from her aol web mail. And unfortunately, having her sign up for a gmail account is not an option. Thanks
Interesting. Firstly I have been on AOL since the early 90s with no current intention to switch as my primary personal email account.
I have two email accounts on my iphone - AOL and my email from my business website. I deleted both and then recreated first the business account and then the AOL account. Same error. Then I wasn't sure what you suggested but I turned off the AOL SMTP server and selected the business email SMTP server by turning it on with the same result. I still get the error "A Copy has been placed in your Outbox. Sending the mssage content to the server failed."
Perhaps this problem will get fixed by IOS 6. AOL will not talk to me unless I pay and Apple says its not their problem. So for the time being I use the AOL web interface in the iPhone's Safari to send emails from the phone. -
Beginner help to send an email from PHP
I hope this isn't too easy to answer - I think I must be doing something fairly simple wrong.
I want to send an email from a PHP page, using SOAP so the mail appears in the sender's sent items, as if it was done in the usual way.
We're using Groupwise 8.02
Using the example code in phpClient/phpClient.php I have got a list of folders/emails in my mailbox, so the authentication and access to Groupwise is obviously working. However, in that file there isn't a send mail example, so I copied the one from phpSOAP/client.php and it doesn't work.....the error seems to be 59920 which might be something to do with the session missing, but I find this hard to believe since the folders can be retrieved with the same object.
Here is the code for mail sending I'm using:
$mail = new Mail();
$mail->subject = "php item";
$dist = new Distribution();
$from = new From();
$from->displayName = "Paul Green";
$from->email = "[email protected]";
$dist->from = "[email protected]";;
$dist->to = "Paul Green";
$rlist = new RecipientList();
$recip1 = new Recipient();
$recip1->displayName = "Peter";
$recip1->email = "[email protected]";
$recip2 = new Recipient();
$recip2->displayName = "Andy";
$recip2->email = "[email protected]";
$rlist->recipient = array ($recip1, $recip2);
$dist->recipients = $rlist;
$mail->distribution = $dist;
$mp = new MessagePart();
$mp->_ = "This is a test!";
$mb = new MessageBody();
$mb->part = $mp;
$mail->message = $mb;
$sir = new sendItemRequest();
$sir->item = $mail;
$sires = $gwservice->sendItemRequest($sir);
Looking around, it seems to me that some of the objects haven't got the properties that the above code expects (eg the from object), so is the schema wrong somewhere?
What I would like, but couldn't find, is some simple example code that works!
Does anyone know the simplest way to send an email via SOAP?
Many thanks in advance for any help anyone can give.
Paul Green
Barton Peveril College
Eastleigh
Hampshire
UKThe phpClient code was a proof of concept.
I only hand fixed a few of the requests.
If you use that code, you will need to go into each
request you want to use and put in code to put in the
session string. You need to do that in GroupWiseService.php.
You may need to modify the individual files, ie Filter.php.
The phpSOAP code works better / easier. You shouldn't have
to modify that code. (You should be able to just use it.)
That said, I only did a spot check. The code is as is. There
is no support for it.
Preston
>>> On Friday, June 29, 2012 at 9:56 AM,
PaulGreen77<[email protected]> wrote:
> Thanks for the suggestions. I tried the phpClient code you suggested,
> but it didn't work at all. I don't quite understand what you say about
> setting the session header string; I think my code does this already.
>
> Early on in the code, after logging in, I have the following line
> $gwservice‑>session = $lres['session'];
> Doesn't this set the session as part of the Groupwise service?
>
> You said I need to manually set the session header string, but which
> objects do i need to do it in? And can I do it as a parameter call, or
> does it need to be done in GroupwiseService.php?
>
> I hope this doesn't make me sound too silly, but I am a bit of a novice
> with OO programming!
>
> Another point: at various places in the code,
> http://schemas.novell.com/2005/01/Gr...groupwise.wsdl is referred
> to, but when I type this into a web browser, it says it can't be found?
> Does this matter?
>
> I hope you can help me a bit further!
>
> Thanks.
>
> Paul
>
> Preston Stephenson;2203363 Wrote:
>> If you can use php 3.x, use the phpSOAP example instead.
>> ftp://sdk.provo.novell.com/ndk/gwsoa...rm/phpSOAP.ZIP
>>
>> It will handle setting the session string header automatically.
>> If you use the phpClient example, you will have to go in to
>> GroupwiseService.php
>> and manually set the session header string in each request you want to
>> use.
>> See getFolderListRequest().
>>
>> Preston
>>
>> >>> On Friday, June 22, 2012 at 9:56 AM,
>> PaulGreen77<PaulGreen77@no‑mx.forums.novell.com> wrote:
>>
>> > I hope this isn't too easy to answer ‑ I think I must be doing
>> something
>> > fairly simple wrong.
>> > I want to send an email from a PHP page, using SOAP so the mail
>> appears
>> > in the sender's sent items, as if it was done in the usual way.
>> > We're using Groupwise 8.02
>> >
>> > Using the example code in phpClient/phpClient.php I have got a list
>> of
>> > folders/emails in my mailbox, so the authentication and access to
>> > Groupwise is obviously working. However, in that file there isn't a
>> send
>> > mail example, so I copied the one from phpSOAP/client.php and it
>> doesn't
>> > work.....the error seems to be 59920 which might be something to do
>> with
>> > the session missing, but I find this hard to believe since the
>> folders
>> > can be retrieved with the same object.
>> >
>> > Here is the code for mail sending I'm using:
>> >
>> > $mail = new Mail();
>> > $mail‑>subject = "php item";
>> > $dist = new Distribution();
>> > $from = new From();
>> > $from‑>displayName = "Paul Green";
>> > $from‑>email = "[email protected]";
>> > $dist‑>from = "[email protected]";;
>> > $dist‑>to = "Paul Green";
>> > $rlist = new RecipientList();
>> > $recip1 = new Recipient();
>> > $recip1‑>displayName = "Peter";
>> > $recip1‑>email = "[email protected]";
>> > $recip2 = new Recipient();
>> > $recip2‑>displayName = "Andy";
>> > $recip2‑>email = "[email protected]";
>> > $rlist‑>recipient = array ($recip1, $recip2);
>> > $dist‑>recipients = $rlist;
>> > $mail‑>distribution = $dist;
>> > $mp = new MessagePart();
>> > $mp‑>_ = "This is a test!";
>> > $mb = new MessageBody();
>> > $mb‑>part = $mp;
>> > $mail‑>message = $mb;
>> > $sir = new sendItemRequest();
>> > $sir‑>item = $mail;
>> > $sires = $gwservice‑>sendItemRequest($sir);
>> >
>> > Looking around, it seems to me that some of the objects haven't got
>> the
>> > properties that the above code expects (eg the from object), so is
>> the
>> > schema wrong somewhere?
>> > What I would like, but couldn't find, is some simple example code
>> that
>> > works!
>> > Does anyone know the simplest way to send an email via SOAP?
>> >
>> > Many thanks in advance for any help anyone can give.
>> >
>> > Paul Green
>> > Barton Peveril College
>> > Eastleigh
>> > Hampshire
>> > UK -
Sending mail problem via php mail()
I have a PHP server with Apache 2 and PHP 4 and 5 and MySQL
I have a very very simple mail script that only works with @gmail.com, hotmail.com etc
But say if I had an email address for my company "[email protected]" it does not go through.
Is this a PHP issue or a Server issue?
How can I fix this as my customer is being an Arse!
mail("$mail1","Thank you for registering with $sitename",
"You have registered this email address at $sitename \n
Email: $mail1
Password: $pass
Date/Time: $date","FROM:$adminaddress");First, you need to talk to your host, and have them install PEAR::Mail, and have them put the Mail.php path into the php.ini include path directive.
Here is a function I was using some time ago, before I switched to Zend Mail.
You need to edit / add the BOLD parts
<?php
require_once("Mail.php");
function sendEmail($to_mail, $to_name, $from_mail, $from_name, $subject, $body){
$from = $from_name." <".$from.">";
$to = $to_name." <".$to.">";
$recipients = $to_mail;
$headers["From"] = $from;
$headers["To"] = $to;
$headers["Subject"] = $subject;
$headers["Reply-To"] = $from_mail;
$headers["Content-Type"] = "text/plain; charset=UTF-8";
$headers["MIME-Version"] = "1.0";
$headers["Return-path"] = $from_mail;
$headers["X-Priority"] = "3";
$headers["X-MSmail-Priority"] = "Normal";
$smtpinfo["host"] = "YOUR MAIL SERVER HERE";
$smtpinfo["port"] = "25";
$smtpinfo["auth"] = true;
$smtpinfo["username"] = "YOUR EMAIL LOGIN USER HERE";
$smtpinfo["password"] = "YOUR LOGIN PASSWORD HERE";
$mail_object =& Mail::factory("smtp", $smtpinfo);
$mail_object->send($recipients, $headers, $mailmsg);
?>
To send email:
<?php
sendEmail($mail1,
$recipient_name,
$from_mail,
$from_name, "Thank you for registering with $sitename", "You have registered this email address at $sitename \n
Email: $mail1
Password: $pass
Date/Time: $date","FROM:$adminaddress");
?> -
After update, cannot send email via any accounts! Please help!
First of all, thank you for reading my thread.
After updating few days ago, I cannot send any email via any acounts. I have .mac email and yahoo email. But I still can receive emails. I have checked message borad, it said "Some members experienced difficulty sending .Mac Mail via computer email applications from 3:30 am to 6 am Pacific Time. Normal service has been restored." But mine hasn't!!! It has been almost a week!!
The erro message says "cannot send email using this mail server, please choose one of the following server and retry again"
My english is not very good, I hope you understand my question and any help would be appreciated, thank you again.Thank you very much for your reply!
This is what I got:
PING smtp.mac.com (17.250.248.45): 56 data bytes
--- smtp.mac.com ping statistics ---
10 packets transmitted, 0 packets received, 100% packet loss
PING mail.mac.com (17.250.248.152): 56 data bytes
--- mail.mac.com ping statistics ---
10 packets transmitted, 0 packets received, 100% packet loss
It seems the problem is the server, but it has been many days, I don't think apple haven't had notice this.
What should I do next? -
Since the upgrade to Mountain Lion (OSX 10.8) I have noit been able to send email via Apple Mail through the O2 network in the UK. O2 say they are aware of this but that it is something that Apple need to address via a patch.
Following a 45 minute call to O2 yesterday I've just had a further conversation with O2 who advised me to change my 'port setting' to 25. Mail now works fine! Panic over.
-
Email via Photo App in IOS (iPhone) is not send
All,
My wife is using a iPhone 4 with 6.1.1 and she is having problems with sending an email (with photo) via the default photo app. The emals are not send at all. When sending a email via the email app emails are send normal.
Anybody any idea what can be wrong I have no clue.
Regards,
Nielshi - it sounds like it might the settings for the email account
you don't say what email she has - is it hotmail/yahoo etc??
double check settings/Mail etc
i had the same problem with the ipad email and transpired the settings were wrong for my account, also check that WiFi is on as well just in case under the General settings
failing that, you could try a specific email app like altamail -
I have at&t internet and cannot send using my at&t email. I can send via gmail. Or if I go use someone elses internet, not being at&t, I can send. At&t said it is a mac issue. I told them it is their issue with macs since I can send using other providers.
Anyone know of a fix?Does not help.. my problem is a little different
I have an iMac and I cannot send emails via outlook 2011. I have 3 emails stuck in the sent box... They are not in my sent or inbox. Every time I send an email it first tries to send these 3 mails. for 2 I get an error code 3210 and for one "5.1.2 or other punctuation after the recipient's email address. g5sm23942864eem.4". I have an euronet account and not a hotmail account.
Maybe you are looking for
-
How do i format an external hard drive for use on both windows and mac book air?
how do i format an external hard drive for use on both windows pc and mac book air?
-
My ipod mini, which I've owned for LESS than 1 year now, resets itself automatically. Not only does it reset itself and erases all my songs, it fails to be read by my PC or iTunes. After the first time it reset itself, I sent it in to be repaired, wh
-
Can someone help with Iphoto 09 and Time Machine
I upgraded to ilife 09.....I am having problems between iphoto and time machine. All my photos are in iphoto but when I went to see if everything was ok in time machine all I find are blank windows no photos from iphotos are in there. Everything was
-
Inverted, "negative" JPG images?
I'm having a strange problem with certain JPG images when I import them into Keynote. Most work fine when dragged into Keynote, but a few (those coming from a co-worker, usually exported from Photoshop) turn into "negative" reverse-color images when
-
Running a project by clicking a icon without running oracle form builder
Hi, How can I Run a project by clicking a icon without running oracle form builder????? Regards Ashraf