php-windows Digest 6 Jun 2011 17:02:09 -0000 Issue 3954

Topics (messages 30636 through 30640):

Re: Sending mail via gmail account
        30636 by: Tac Tacelosky
        30637 by: Larry L.
        30638 by: Pierre Joye
        30639 by: Larry L.

Contact Form Problem
        30640 by: dustie

Administrivia:

To subscribe to the digest, e-mail:
        [email protected]

To unsubscribe from the digest, e-mail:
        [email protected]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
Get phpmailer, best way to send mail from php under Windows.  See this
tutorial:

http://www.110mb.com/forum/index.php?topic=14144.0

Tac


On Tue, May 31, 2011 at 9:08 AM, Larry L. <[email protected]> wrote:

> Hi,
>
> I'm a newbie and trying to send mail using my gmail account from the
> Windows
> 7 machine I'm using to run PHP scripts from. Can someone please tell me how
> to do this? I can send mail from the machine using Outlook Express, so all
> the usual mechanisms are in place, I'm just not having any luck figuring
> out
> which calls/parameters to make/set.
>
> Thanks,
> Larry L.
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
Almost there. I'm using phpmailer, but I get the following error:
Mailer Error: Language string failed to load: from_failedmyemailaddr[ 
@ ]gmail.com

Any ideas why?

"Tac Tacelosky" <[email protected]> wrote in message 
news:[email protected]...
> Get phpmailer, best way to send mail from php under Windows.  See this
> tutorial:
>
> http://www.110mb.com/forum/index.php?topic=14144.0
>
> Tac
>
>
> On Tue, May 31, 2011 at 9:08 AM, Larry L. <[email protected]> wrote:
>
>> Hi,
>>
>> I'm a newbie and trying to send mail using my gmail account from the
>> Windows
>> 7 machine I'm using to run PHP scripts from. Can someone please tell me 
>> how
>> to do this? I can send mail from the machine using Outlook Express, so 
>> all
>> the usual mechanisms are in place, I'm just not having any luck figuring
>> out
>> which calls/parameters to make/set.
>>
>> Thanks,
>> Larry L.
>>
>>
>>
>> --
>> PHP Windows Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
> 



--- End Message ---
--- Begin Message ---
hi,

check out the hundred examples out there, google with imap gmail will
give you some of them.

Cheers,
On Tue, May 31, 2011 at 3:08 PM, Larry L. <[email protected]> wrote:
> Hi,
>
> I'm a newbie and trying to send mail using my gmail account from the Windows
> 7 machine I'm using to run PHP scripts from. Can someone please tell me how
> to do this? I can send mail from the machine using Outlook Express, so all
> the usual mechanisms are in place, I'm just not having any luck figuring out
> which calls/parameters to make/set.
>
> Thanks,
> Larry L.
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>



-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org

--- End Message ---
--- Begin Message ---
Got it working. Thanks for the help!

"Pierre Joye" <[email protected]> wrote in message 
news:[email protected]...
> hi,
>
> check out the hundred examples out there, google with imap gmail will
> give you some of them.
>
> Cheers,
> On Tue, May 31, 2011 at 3:08 PM, Larry L. <[email protected]> wrote:
>> Hi,
>>
>> I'm a newbie and trying to send mail using my gmail account from the 
>> Windows
>> 7 machine I'm using to run PHP scripts from. Can someone please tell me 
>> how
>> to do this? I can send mail from the machine using Outlook Express, so 
>> all
>> the usual mechanisms are in place, I'm just not having any luck figuring 
>> out
>> which calls/parameters to make/set.
>>
>> Thanks,
>> Larry L.
>>
>>
>>
>> --
>> PHP Windows Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
>
>
> -- 
> Pierre
>
> @pierrejoye | http://blog.thepimp.net | http://www.libgd.org 



--- End Message ---
--- Begin Message ---
Hi all

Got an absolutely baffling problem with a bit of code that I've been using for a very long time now that I've never had a problem with until now...

Here's the code:

*<?php
$To = "[email protected]";
$Subject = "Testing";
$Headers = "From: [email protected]";
if (!isset($_POST['Email'])){ ?>
<div id="contact_form">
<form id="form" name="Form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<label>Name</label>
<input type="text" name="Name" />
<label>Email Address<em></label>
<input type="text" name="Email" />
<label>Message:</label>
<textarea name="Message" rows="10" cols="10"></textarea>
<button type="submit" name="Submit">Send!!</button>
</form>
</div>
<?php
    } else {
        $Line1="you got the following message:";
$Content = "$Line1\n\nName: $_POST[Name]\n\nEmail: $_POST[Email]\n\nMessage:\n\n$_POST[Message]"; mail("$To","$Subject","$Content","$Headers");
    } ?>
*

When it runs, no email is forwarded from it. It's always worked before and, after a very long time diagnosing, I've pinpointed what the problem is - it's the 4th line:

*$Headers = "From: [email protected]";*

Specifically, the domain name. If I change it to *anything else* at all (such as wedding.com or swindon.com), the form works and the message arrives. Keep it as it is though and the message just disappears down a black hole. This is the same domain name that the page/site is going to be hosted at. Has anyone got any idea at all why this is happening? All my other websites use the same code and have their own domain name in the email address and work perfectly. Why is this one single site not playing ball?

Thanks in advance

Darren

--- End Message ---

Reply via email to