kernelgpf Posted March 27, 2010 Share Posted March 27, 2010 I have been Googling for hours and cannot find a solution. My code: $from_name = 'Alacrity'; $from_email = '[email protected]'; // From Phone Number $sendto = $urow[phone].$urow[phone_email]; $headers .= "From: ".$from_email."\r\n"; $headers .= "Reply-To: ".$from_name." <".$from_email.">\r\n"; //$headers .= "MIME-Version: 1.0\r\n"; $headers .= "Content-Type: text/html; charset=ISO-8859-1\r\n"; $subj = "Alacrity Alert"; $body = "<a href='userprofiles.php?id=$sid'>Player #$sid</a> scribbled on <a href='userprofiles.php'>your profile</a>!"; mail($sendto, $subj, $body, $headers); I've tried mlutiple charsets I've found online, and all I know is when I add the MIME line it simply erases all HTML. I'm trying to have this sent as a text message that contains clickable links to the pages specified in the HTML. Help? Link to comment https://forums.phpfreaks.com/topic/196716-send-a-text-message-with-html/ Share on other sites More sharing options...
teamatomic Posted March 27, 2010 Share Posted March 27, 2010 You cant. That why it s TEXT message. Some phones will accept a pushed WAP(wml) message sent through a GSM modem or a GSM phone connected to a PC. http://www.developershome.com/sms/howToSendSMSFromPC.asp http://www.developershome.com/sms/howToSendSMSFromPC.asp HTH Teamatomic Link to comment https://forums.phpfreaks.com/topic/196716-send-a-text-message-with-html/#findComment-1032774 Share on other sites More sharing options...
kernelgpf Posted March 27, 2010 Author Share Posted March 27, 2010 I find this hard to believe seeing as I get texts from companies with links that I click on in the same fashion? Link to comment https://forums.phpfreaks.com/topic/196716-send-a-text-message-with-html/#findComment-1032775 Share on other sites More sharing options...
teamatomic Posted March 27, 2010 Share Posted March 27, 2010 Note the "some phones". You can send a link through your phones browser, but its not the same as a SMS text message, its SMSC. HTH Teamatomic Link to comment https://forums.phpfreaks.com/topic/196716-send-a-text-message-with-html/#findComment-1032777 Share on other sites More sharing options...
Amtran Posted March 27, 2010 Share Posted March 27, 2010 You actually can send a text message using email. Something like: <?php $number = '5255558794'; $num_suffix = 'txt.att.net'; mail($number . '@' . $num_suffix, 'Some Subject...', 'This is a SMS sent via the PHP mail() function.', 'From: Mr. Text <15735558372>'); All major carriers have some way of sending a text to a phone via an email address. Some simple googling will get you a list of them, and then you can obviously use a dropdown or something to have the user specify their carrier when they enter their number, or even do a lookup of the number. Oh, and that stuff isn't HTML, it's PHP Link to comment https://forums.phpfreaks.com/topic/196716-send-a-text-message-with-html/#findComment-1032800 Share on other sites More sharing options...
kernelgpf Posted March 29, 2010 Author Share Posted March 29, 2010 That's exactly what my code up there does, the number and email appendage is passed in through a database entry. I'm trying to send HTML in a text message. Link to comment https://forums.phpfreaks.com/topic/196716-send-a-text-message-with-html/#findComment-1033275 Share on other sites More sharing options...
Amtran Posted March 29, 2010 Share Posted March 29, 2010 Ah. Okay, it's official, my IQ is lower than the temperature of my room right now Link to comment https://forums.phpfreaks.com/topic/196716-send-a-text-message-with-html/#findComment-1033350 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.