Jump to content

vbcoach

Members
  • Posts

    123
  • Joined

  • Last visited

Everything posted by vbcoach

  1. This was one of the most thoughtful, well written responses I have ever had on this forum in all the years that I have been on here. You are spot-on in regards to my skill set, but I have had to learn everything on my own. Thank you for your thoughtful (and not demeaning) response.
  2. For anyone who might be reading this using the Network Solutions Shared Hosting platform, the ultimate fix was the mail server security was changed last November and required SSL/TLS now, even though they did not update their own documentation. Even their own technicians were not aware of this. The ultimate fix was upgrading PHPMailer to v6.6.0 and changing the port to 587 with TLS (on localhost)
  3. So PHP 7.4 threw too many errors on my site, so I dropped down to PHP 7.0 Took care of other issues, but now on the test PHPMail script getting this error - I think it has something to do with the headers not being recognized? Warning: mail(): SMTP server response: 553 5.0.0 <custserv@networksolutions.com... Unbalanced '<' 500 5.5.1 Command unrecognized: "Content-Type:text/html>" in \\WDP\DFS\30\1\9\6\3007726691\user\sites\xxxxxx.site\www\mailer.php on line 19 FAILED TO SEND! Any thoughts? Anyone?
  4. Also, what I would like to do now since I have upgraded the PHP to v7.4 is to try the newer PHPMailer v5.6 or v6.x - but I am running a Windows website on NetSol shared hosting platform, so I do not have backend or command-line access like I do on a linux system. When I look at the PHPMailer code, I do not see files from the documentation like the PHPautoloader.php for example, nor do I see a folder called vendor anywhere? IU am kind of stumped at this point and really need some help with this ASAP! Thanks...
  5. Well what I did was to upgrade php from v5.6 to v7.4 and now nothing works, except for better error messages. <html> <head> <title>PHP Form Mail Test Script</title> </head> <body> <h3>PHP Form Mail Test Script</h3> <?PHP error_reporting(E_ALL); $email = $_REQUEST['email']; $body = $_REQUEST['body']; $subject = $_REQUEST['subject']; $from = $_REQUEST['from']; $sendusing = $_REQUEST['sendusing']; $usehtml = $_REQUEST['usehtml']; if ($sendusing == "mail") { $header = "From: " . $from . "\n"; if ($usehtml == "yes") $header .= "Content-Type:text/html\n"; else $header .= "Content-Type:text/plain\n"; if (mail($email, $subject, $body, $header)) echo "SUCCESS... Email sent using Mail() function";else echo "FAILED TO SEND!"; echo "<br>" . date('l dS \of F Y h:i:s A') . "<br><br>"; } else if ($sendusing == "pear") { if (mail_this($email, $subject, $body, $from)) echo "SUCCESS... Email sent to using PEAR module";else echo "FAILED TO SEND!"; echo "<br>" . date('l dS \of F Y h:i:s A') . "<br><br>"; } else { $email = "Type Email Address"; $body = "FormMail Test"; $subject = "Test Email"; $from = "custserv@networksolutions.com"; $sendusing = "mail"; } ?> <table><form method="post" action="" name="sendmailtest"> <tr><td>TO:</td><td><input value="<?PHP echo $email;?>" name="email" size="35"></td></tr> <tr><td>FROM:</td><td><input value="<?PHP echo $from;?>" name="from" size="35"></td></tr> <tr><td>Subject:</td><td><input value="<?PHP echo $subject;?>" name="subject" size="35"></td></tr> <tr><td colspan=2>Body:<br><textarea cols="45" rows="3" name="body"><?PHP echo $body;?></textarea></tr> <tr><td>Send Using:</td> <td><input name='sendusing' value='mail' type='radio'<?PHP if ($sendusing == "mail") echo " checked='checked'";?>><b>Mail() Function</b><br> <input name='sendusing' value='pear' type='radio'<?PHP if ($sendusing == "pear") echo " checked='checked'";?>><b>PEAR Module</b></td></tr> <tr><td>Use HTML <input name="usehtml" value="yes" type="checkbox"<?PHP if ($usehtml == "yes") echo " checked='checked'";?>></td> <td align=right><input name="submit" value="Send Email" type="submit"></td></tr> </form></table> <?PHP function mail_this($email, $subject, $body, $from) { include('Mail.php'); $headers['From'] = $from; $headers['To'] = $email; $headers['Subject'] = $subject; if ($usehtml == "yes") $headers['Content-type'] = "text/html"; else $headers['Content-type'] = "text/plain"; $params["host"] = "localhost"; $params["port"] = "25"; $params["auth"] = false; $params["username"] = "username"; $params["password"] = "password"; // Create the mail object using the Mail::factory method $mail_object =& Mail::factory('smtp', $params); $mail_object->send($email, $headers, $body); if (PEAR::isError($mail_object)) { return false; } else { return true; } } ?> </body> <!-- ####################################################### ## ## ## NOTE: This is a Network Solutions Test Script. ## ## Any modifications to this script are not the ## ## responsibility of Network Solutions as this script## ## was generated only to ensure that your service is ## ## functioning properly. ## ## ## ####################################################### --> </html> Anyone else care to take a stab at this? Thanks for trying Ginerjm
  6. Anyone else care to take a stab at this? Thanks for trying Ginerjm
  7. Wow! We are just not on the same page here! The NS script is only a "test script" to verify that the PHP Mail() service is working. It send out a test email given the options you enter. If I "UNCHECK" the send using HTML box, the test script sends out a 'test' email properly and returns a message saying the email was sent successfully. If I "CHECK" the use HTML box, I still get the same message that the email was sent successfully, but no email is received. NetSol is obvioulsy blocking HTML emails from being sent somehow. I just can't figure out what they did on the backend to block HTML emails.
  8. Let's take the confusion out of this, shall we? For years and years and years, I have been using the PHPMail script on github. Been working sending html emails for 7-8 years now without issue. It stopped sending last November. Something changed at NetSol and I don't know what it might be? Some security issue most likely? Network Solutions placed a test php mail script in my root folder years ago for testing. It was created by NetSol for NetSol accounts for testing purposes. That test script has various small options like using PHP Mail() or PEAR module, and also has a checkbox to enable sending as HTML. This script verified that PHPMail() is working. With HTML unchecked, the test email sends just fine, and I receive a message stating that the email has been sent successfully. With the HTML box checked? Same response, message sent successfully, but no HTML email is ever received. Hope this clears things up? What have I done? Remember, nothing in the original PHPMail script (or website) has been changed at all regarding the PHPMail module. In the TEST script, I tried auth-true and entered the un & pw, and still no HTML mail is ever received. This is why I came here. Why is HTML mail suddenly being blocked?
  9. I was saying that I was using two scripts. It's the Network Solution test-email.php script that has the HTML checkbox option. The PHPMail script I use to send the team receipt page emails already has HTML enabled. The script returns a message that the email is being sent as usual, but nothing is received via email.
  10. Yes, the isHTML(true) is part of the PHPMail script and my test-mail script. Only difference is that the test script has a checkbox to enable sending of mail using HTML. That's when it stops sending.
  11. Added the error reporting, no errors - says the HTML email was sent, but it never arrives.
  12. Yes for the past two days I have contacted numerous people over at Network Solutions, and all they want to do is send me over to their paid support a.k.a. "MyTime Support". My code hasn't changed a bit, but I am sure Network Solutions did some upgrades they didn't tell me about.
  13. As you may already know, I do not have rights to edit the php.ini code as it is on a shared hosting site, but I will try your suggestion to add these two lines of code and see how the site reacts to it. I am using the pretty much standard PHPMail script. This script has served me well for the past 7-8 years or so and was working quite fine, actually. That is up until November of last year. The script still works, but only without HTML. Don't know if NetSol suddenly requires SMTP Auth now or what? Let me see what happens with your suggested changes...
  14. Hello all. Need assistance on something I think should be a simple fix . I am using a PHP Mailer app on my website hosting, which is Network Solutions, I know, shame on me. Very recently Network Solutions stopped sending my HTML-encoded emails for some unknown odd reason. Using their PHP mail testing application, those emails with non-HTML are working and sending just fine, but as soon as I try to send one with HTML(isHTML=True) encoding, it never sends, but I also don't get an error. The program tells me the email was sent successfully. Can anyone help me out here?
  15. Thank you ginerjm, I will give that a try. Much appreciated. I inherited this mess. Thanks for your help.
  16. I've dealt with you before. You're very good at accusing - not very good at helping. Why are you still here? Found someone at another site who was very helpful.
  17. Anyone else able to help?
  18. I am reading the replies. You are writing to me code that I am unfamiliar with. When you ask me to place this information in my code to see if it works, that's what I do. If something is missing from your example, it doesn't help me fix the issue, or learn the how and why you did it this way. So very humbly, what is missing here?
  19. Oh, I might add that what I am looking for overall here is that if the team captain select a tshirt at the time of registration, I would like it to be "SELECTED" and displayed here. If the field is blank, then I would like for all the tshirt options be be available to be chosen. Hope that helps?
  20. Hello Psycho, thanks for your very quick response. I know my code is older, but I inherited it. As I try to wrap my head around what you wrote, one thing that was apparent as I entered the code was the HTML portion seems to be mission some type of variable statement. The <select name="size" id="size"> <?php echo ; ?> </select> is not actually echoing anything. What's missing here?
  21. Hello all. I am having an issue displaying data in a form that IF EXISTS (not blank) will cause that option to be selected. The looping itself works. The variable called into the form works. Just can't seem to get the form to SELECT the correct variable. <select name="size" id="size"> <?php while ($lrow = mssqlfetchassoc($tres)) { ?> <option value="<?php echo $lrow['ts_id'];?>"> <?php if($lrow['tsdescription'] == $info['size']) echo 'selected';?> <?php echo "$lrow[tsdescription]";?> </option> <?php } ?> </select> So this is displaying the team captain's TShirt size from a database (mssql). In the database the field is called tsdescription. For sake of argument, let's say the tshirt description is "Blue 2XLarge". This variable exists and is passed into the form for updating by the team captain, if necessary. The loop works, as it loops through all the tshirt options (107 in total) and works as a pull-down menu. Somehow my IF statement doesn't work. What I am looking for is for PHP to "find" the existing tshirt description 'tsdescription' in the loop statement, and if found, cause it to be "Selected". The $info are the variables for the form when the captain's information page is loaded. So far, by itself, the $info['size'] returns the correct tshirt. "by itself" the dropdown works. Thus, something must be amiss in my IF statement. Can anyone help direct me to what I am missing to make this work? Thanks in advance. -J
  22. It took a lot or research and editing, but I found my answer. Thanks all.
  23. Let me try this again. In the middle of my page, there is a form statement that creates buttons to push. I would like to create an "IF" statement to display or not display these buttons. In my code I use "session" but it really means "season" as in Spring or Summer. So if the "season" = Summer, then display these buttons. The basic code for these buttons looks like this: <?php if($row['ptsordered'] == '') { ?> <form name="player<?= $row['p_id'] ?>" action="editPlayer.php" method="get"> <input type="hidden" name="p" value="<?= $row['p_id'] ?>"> <input name="Submit" type="submit" class="button" value="Edit"> </form> <?php } ?> </td> <td><form name="del_player<?= $row['p_id'] ?>" action="remPlayer.php" method="post" onSubmit="return(confirm('Are you sure you want to delete <?= $row['name']?>?\n\nThis cannot be reversed'))"> <input type="hidden" name="p" value="<?= $row['p_id'] ?>"> <input type="hidden" name="t" value="<?= $id ?>"> <input name="Submit" type="submit" class="button" value="Remove"> </form></td> </tr> <?php $i++; } ?> So I need help with a PHP statement that says if "session = 'Summer" then ..." displays the buttons, if not, the buttons are not displayed. Does this make sense now? Sorry for the confusion.
  24. Hello all. I have a sports league website that is used for captains to be able to view and manipulate certain items displayed in a form format. I want to be able to hide or disable two buttons in the form; the Edit and Remove buttons based on a simple IF statement. However I am not quite being able to make this happen, as the form is outside of the PHP statement. <body> <table width="800" border="0" cellpadding="0" cellspacing="0"> <tr> <td><img src="images/BBV_CP_top.jpg" width="800" height="200"></td> </tr> <tr> <td><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td width="6%" class="menu"><a href="home.php"> Home</a> </td> <td width="9%" class="menu"> <?php if {echo "<a href=editTeam.php> Edit Team </a>";}?></td> <td width="12%" class="menu"> <?php if ($team[session] == 'Summer') {echo "<a href=addPlayer.php> Add Player </a>";}?></td> <td width="63%" class="menu"><br> <?php if ($team[session] == 'Summer') {echo "<a href=editInfo.php> Edit My Information </a>";}?></td> <td width="10%" class="menu"><a href="logout.php">Log Out </a></td> </tr> </table></td> </tr> <tr> <td><table width="765" border="0" cellspacing="1" cellpadding="1"> <?php if($info['feepaid'] == 'n') { ?> <tr> <td colspan="2" align="left" valign="top"> </td> </tr> <?php }?> <tr> <td width="37%" align="left" valign="top"><br> <table width="100%" border="0" cellpadding="2" cellspacing="0" class="grey2px"> <tr> <td colspan="2" class="dk_greyTxt"><h3><strong>Captain's Information</strong></h3></td> </tr> <tr> <td width="27%" class="dk_greyTxt"><strong>Name</strong></td> <td width="73%"><?php echo $info['cptname']; ?> </td> </tr> <tr> <td class="dk_greyTxt"><strong>Address</strong></td> <td><?php echo $info['address']; ?><br> <?php echo "$info[city], $info[state] $info[zip]"; ?> </td> </tr> <tr> <td class="dk_greyTxt"><strong>Phone</strong></td> <td><?php echo $info['phone'] ?></td> </tr> <tr> <td class="dk_greyTxt"><strong>E-mail</strong></td> <td><?php echo $info['email'] ?></td> </tr> <tr> <td class="dk_greyTxt"><strong>Shirt Size </strong></td> <td><?php echo $info['size'] ?></td> </tr> </table> <br></td> <td width="63%" rowspan="2" align="left" valign="top"><br> <table width="100%" cellpadding="1" cellspacing="0" class="grey2px"> <tr class="dk_greyTxt"> <td colspan="6"><h3><strong>Player's Information</strong></h3></td> </tr> <tr class="dk_greyTxt"> <td width="21%"><strong>Name</strong></td> <td width="23%"><strong>E-mail</strong></td> <td width="21%"><div align="center"><strong>Shirt Size</strong></div></td> <td width="19%"> </td> <td width="16%"> </td> </tr> <?php $i=0; while($row = mssqlfetchassoc($players)) { ?> <tr <?php if($i%2 == 0) echo "class='altbg'";?> > <td><?php echo $row['name'] ?></td> <td><?php echo $row['email'] ?></td> <td align="center"><?php echo $row['pshirt'] ?></td> <td><form name="del_player<?= $row['p_id'] ?>" action="remPlayer.php" method="post" onSubmit="return(confirm('Are you sure you want to delete <?= $row['name']?>?\n\nThis cannot be reversed'))"> </form></td> <td><form name="player<?= $row['p_id'] ?>" action="editPlayer.php" method="post"> </form></td> </tr> <?php $i++; } ?> </table></td> </tr> <tr> <td align="left" valign="top"><br> <table width="100%" border="0" cellpadding="2" cellspacing="0" class="grey2px"> <tr> <td colspan="2" class="dk_greyTxt"><h3>Team Information </h3></td> </tr> <tr> <td width="27%" class="dk_greyTxt"><strong>Name</strong></td> <td width="73%"><?php echo $team['teamname']; ?></td> </tr> <tr> <td class="dk_greyTxt"><strong>League</strong></td> <td><?php echo "$team[night] $team[type] $team[size]s"; ?></td> </tr> <tr> <td class="dk_greyTxt"><strong>Division</strong></td> <td><?php echo $team['division'] ?></td> </tr> <tr> <td class="dk_greyTxt"><strong>Shirt Color </strong></td> <td><?php echo $team['shirtcolor'] ?></td> </tr> <tr> <td class="dk_greyTxt"><strong>Registration Date </strong></td> <td><?php echo $team['reg_start'] ?></td> </tr> <?php if($info['feepaid'] == 'n') { ?> <?php } else { ?> <tr> <td class="dk_greyTxt"><strong>Registration Completed </strong></td> <td><?php echo $team['reg_done'] ?></td> </tr> <?php } ?> <?php mssqlclose(); ?> <tr> <td class="dk_greyTxt"><strong>Record </strong></td> <td> </td> </tr> </table></td> </tr> </table></td> </tr> </table> <br> </body> Under the Players table, there is an Edit and Remove button. I would like to hide this button based upon a PHP statement that looks a bit like this: <?php if ($team[session] == 'Summer')... Basically we are in the Spring session, thus at this point in the season, I do not want teams to be able to edit, add, or remove any player information. However the same database is used for both Spring and Summer registrations. So any help incorporating this php statement to hide these buttons would be greatly appreciated! -J
  25. Well these are all great ideas, but this doesn't help me with my initial query
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.