Notifications - Page 2 - Post ID 292129

User 2140875 Photo


Registered User
367 posts

Mark,

Could you share your script with me. Seems like you are closer to getting it right than me. I'll be able to compare the to and hopefully make mine better.

Thanks
User 187934 Photo


Senior Advisor
20,193 posts

I'm testing. It did work on my host but now it's being blocked.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 283347 Photo


Registered User
388 posts

Galen Garretson wrote:
Mark,

Could you share your script with me. Seems like you are closer to getting it right than me. I'll be able to compare the to and hopefully make mine better.

Thanks


Here is what I did...I got a text...but the customer name and phone number did not show...I tried to change it and then I got nothing...so this at least sends me a text. I am on verizon...so where it has 6165555555 I put my number in...I bolded the areas I used.

$post = $_SESSION['post'];
$post['name'];// form name field
$post['email'];// form email field
$post['telnumber'];// form telephone number
$phonenumber = '6165555555'; //Your phone number
$carrier = 'vtext.com'; // Your carrier SMS
mail($phonenumber."@".$carrier, "", $name." filled out your form.\n Their phone number is ".$telnumber."\n Their eamil is ".$email, "From: Your form name <myname@mydomain.com>\r\n");
User 2140875 Photo


Registered User
367 posts

Well I am getting closer. My form is set up with those three exact fields with the correct field names; name, telnumber, email.

With the script below I am getting a text message. It is from the correct email address, which I set to info@galenswebsite.com.

However the content of the text message does not contain the field information. So it looks like:

filled out your form.
Their phone number is
Their email is

Here is the script:

$post = $_SESSION['post'];
$post['name'];// form name field
$post['email'];// form email field
$post['telnumber'];// form telephone number
$phonenumber = '5414410265'; //Your phone number
$carrier = 'sms.myboostmobile.com'; // Your carrier SMS
mail($phonenumber."@".$carrier,"",$name." filled out your form.\n Their phone number is ".$telnumber."\n Their email is ".$email,"From: Your form name <info@galenswebsite.com>\r\n");

Mark or Eric, your help would be greatly appreciated.
User 187934 Photo


Senior Advisor
20,193 posts

Sorry for the late reply.
Change your mail line to this,
mail($phonenumber."@".$carrier, "", $name." filled out your form.\n Their phone number is ".$telnumber."\n Their email is ".$email, "From: Your form name <info@galenswebsite.com>\r\n");

I tested on my site and it worked.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2140875 Photo


Registered User
367 posts

Hi Eric,

Unfortunately I couldn't get it to work. I still get the fragmented text message:
filled out your form.
Their phone number is
Their email is

But I decided that is ok. The receiver of the text message does not need to know any content of the submitted form, only that the form was submitted.

So I changed the text to read:
Someone completed the Contact Form.
Please check webmail for more information.
Thank you.

So it actually works perfect for want I am wanting to do.

Thanks for all your help.
User 187934 Photo


Senior Advisor
20,193 posts

The variables in your form are different than your using.
Your form you have
fname
lname
Phone
Email


In your code your using
name
telnumber
email

They have to be the exact same. Don't use capitals in input naming.

Change your phone input and email names in your Form to phone and email
and try this code.
$post = $_SESSION['post'];
$post['fname'];// form First name field
$post['lname'];// form last name field
$post['email'];// form email field
$post['phone'];// form phone number
$phonenumber = '5414410265'; //Your phone number
$carrier = 'sms.myboostmobile.com'; // Your carrier SMS
mail($phonenumber."@".$carrier, "", $fname." ".$lname." filled out your form.\n Their phone number is ".$phone."\n Their email is ".$email, "From: Your form name <info@galenswebsite.com>\r\n");


I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 2736027 Photo


Registered User
68 posts

$carrier = 'sms.myboostmobile.com'; // Your carrier SMS
mail($phonenumber."@".$carrier, "", $fname." ".$lname." filled out ...


Or, you can eliminate one concat by adding the '@' character to the $carrier variable, like:

$carrier = '@sms.myboostmobile.com' and then:
mail($phonenumber . $carrier, "", $fname." ".$lname." filled out ...

The results will be the same, but I have a simple mind! :o)
User 2140875 Photo


Registered User
367 posts

Eric,

Sorry, I forgot to mention I am doing testing at a different website (didn't want to mess anything up at the original site). https://galenswebsite.com/contact.html. The form there has all the field names exactly as what is in your script.

Sorry to put you through this. I will just stick with how I have it working now and not worry about inserting names, etc into the text message.

Thank so much for your help and others!

User 283347 Photo


Registered User
388 posts

Hello Eric...regarding this...if I change the code to make it match my form fields even with capitals, will it work? Trying not to change too much on the form as it it related to multiple people (duplicate form...different name).

Thanks,
Mark

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.