Solved

Trying to send email from my hosting server via my exchange server ...

Posted on 2012-03-15
5
418 Views
Last Modified: 2012-06-27
Hi Experts,

I have a joomla website running on a web hosting server out on the internet. Its a hosting companies c-panel access to the website.

Im trying to create a form where a user has to fill in some details and when they hit submit i want the website to send me and email (exchange based) and send an email to the user (using my exchange server email account).

Every time we try and connect to port 25 is says it cant but l'm receiving email with no problem.

Your help and advice would be greatly appreciated.

Trevor
0
Comment
Question by:trevsoft
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 3

Expert Comment

by:sbickerstaff
ID: 37724062
In most cases, people just use the mail() feature built into the php engine:

//--=[ DEFAULT MAIL HEADERS AND ADDITIONAL HEADERS ]=--
$headers  = "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";

// additional headers 
$headers .= "From: John Smith <john.smith@me.com>\r\n";

//--=[ --------- END OF HEADER SETTINGS ---------- ]=--

//obtain parameters sent from function call
$to  = "<enter email address>";
$subject = "New Comment received throught site";

// -=[ MESSAGE IN HTML FORMAT ]=-
$message = "";

//--=[ --- SEND MESSAGE --- ]=--
if (mail($to, $subject, $message, $headers)) {
  return "Your comment was successfully sent.<br /><br /><br />";
}
else {
  return "There was an error during the submission";
}

Open in new window



So you could sent the email address to you and then send another to your customer with the 'from' field in the above code set to match your exchange email address
0
 
LVL 1

Author Comment

by:trevsoft
ID: 37724080
hi,

yes but im find that, when i try to access my exchange server it denies access.

All i really want to do is send the user an email and cc me a copy of the email so i know someone has signed up.


Trevor
0
 
LVL 3

Expert Comment

by:sbickerstaff
ID: 37724087
You mean access Exchange using outlook or via the code?
0
 
LVL 1

Author Comment

by:trevsoft
ID: 37724106
via code.




Trev
0
 
LVL 3

Accepted Solution

by:
sbickerstaff earned 500 total points
ID: 37724118
But if you were to use the mail() function of php, there's no requirement to connect to exchange via code. And as for cc'ing youself, check on how to add cc.

Then you will receive the cc and any of their replies into your exchange account.
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
This article explains how to install and use the NTBackup utility that comes with Windows Server.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
This video discusses moving either the default database or any database to a new volume.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question