Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

I need a php form changed to include SMTP authentification?

Featured Replies

Hi

 

I'm looking for someone to change some mail php() coding so that a php form can be used on hosting that requires SMTP authentification to sent emails. Funnily enough the code does allow a copy of the email to be sent to the submitter but not to our email.

 

Hopefully I'm putting this in the correct place and people can PM me with how much they would want for this.

 

Regards

 

Ashley

 

---

Am I posting in the wrong place for this request?

 

perhaps move this to the server side section, pm a few members who specialise in PHP.

 

Stevo! :)

I've converted one of my forms to smtp recently using this tutorial

http://email.about.c...hentication.htm

There is another tutorial http://www.phpmaniac...x.php/Pear_Mail but I used the first as a main template with parts of the second as it was better for both html and alternative text emails.

You need to install parts of the PEAR module and I installed

Archive_Tar 1.3.10

Auth_SASL 1.0.6

Console_Getopt 1.3.1

Mail 1.2.0

Mail_Mime 1.8.5 (for HTML emails)

Net_SMTP 1.6.1

Net_Socket 1.0.10

PEAR 1.9.4

Structures_Graph 1.0.4

XML_Util 1.2.1

in my host's cPanel control panel (from a PEAR menu there).

I'm not sure that all are needed. Some were because I was sending HTML emails as well as SMTP authenticated.

You must ensure that you have PEAR.php (not the same as pear.php) so look in the file manager after installing to check that it was installed by one of the modules (in php directory, other files are in subdirectories Mail and Net).

I also had a reply email as well as the email to admin, so create a $headers2 variable similar to $headers for the reply email.

 

If sending html emails you need to start the file with

<?php

include_once('/home/your-user/php/Mail.php');
include_once('/home/your-user/php/Mail/mime.php');

instead of only

<?php

include_once('/home/your-user/php/Mail.php');

 

Once installed I found I was getting error messages that various files could not be found and I had to open several files installed in the php/Mail directory relating to PEAR (not the public_html directory for your files) and edit the path where files were include_once or require_once to edit the path where it had php/filename.php but the files were in fact in the same directory. It took a while to sort it out.

Edited by Wickham

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.