PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Tuesday, August 30, 2022

[FIXED] How To Send Email With PHP 5-5.5.9 Smtp Send( ) Function On Ubuntu 14.04

 August 30, 2022     email, pear, php-5.5, smtp, ubuntu-14.04     No comments   

Issue

I want to send e-mail on ubuntu 14.04 with smtp php. But I can't send e-mail because smtp-->send function doesn't work. So that I decided to install pear mail packages. But when ı want to install php pear mail packages on my terminal the error occurs.

For example error occurs as below when ı entered sudo pear install Mail_Mime command to my terminal.

downloading Mail_Mime-1.8.9.tgz ...
Starting to download Mail_Mime-1.8.9.tgz (33,796 bytes)
.........done: 33,796 bytes
could not extract the package.xml file from "/tmp/pear/install/Mail_Mime-1.8.9.tgz"
Download of "pear/Mail_Mime" succeeded, but it is not a valid package archive
Error: cannot download "pear/Mail_Mime"
Download failed
install failed

Because of this errors I decided to upgrade the pear which is in my system.I entered "pear upgrade" command the error occurs as below..

pear/pear dependency package "pear/XML_Util" downloaded version 1.2.3 is not the
recommended version 1.2.1, but may be compatible, use --force to install
pear/XML_Util cannot be installed, conflicts with installed packages
No valid packages found
upgrade failed

I executed "pear clear-cache, pear update-channels" commands before " pear upgrade" command. All commands executed but "pear upgrade" didn't work because of errors as above.

$mail = @$smtp->send(.. , .., ..); function doesn't work. So that mail isn't sended.This send() function worked with 1.9.4 version of pear, 5.3.10 version of php and ubuntu 12.04. But it doesn't work with 1.9.4 version of pear,5.5.9 php and ubuntu 14.04.

I added "sendmail_path" part to php.ini file.But again I couldn't install pear mail packages on terminal.


Solution

You can't install pear mail package on ubuntu 14.04. Because pear didn't upload version for ubuntu 14.04. You can use swift mail package instead of smtp mail package with php in ubuntu 14.04.



Answered By - Mert Özoğul
Answer Checked By - Timothy Miller (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing