View Full Version : Pop out OE
DoNNo
04-08-2006, 02:01 AM
I just want to know, in php code can I have a pop out Outlook Express???
missing-score
04-08-2006, 02:03 AM
huh? Could you possibly expand on the question?
If you mean, "can I access a POP e-mail account", the answer is yes.
If you mean, "can I send a message which will be received in Outlook Express", the answer is yes
DoNNo
04-08-2006, 02:18 AM
:p Sorry about it...
Last time I am using mail to send mail in php.
But in this way it cannot cc to others. So I hope to use Outlook Express to send it so that the user can add in the recipient when they want.
Actually I had try to use mailto:, but i still confusing in how to pass the value to the field in OE, including the content.
Nightfire
04-08-2006, 03:41 AM
You can CC to others using mail()
http://uk.php.net/function.mail
DoNNo
04-08-2006, 03:47 AM
Ya, i know, last time i also use mail one, but because of who i want to cc are not sure one, it depends on the sender. So i hope to use pop out OE so who i want to cc to also can.
Nightfire
04-08-2006, 03:52 AM
Hard to understand you. Anyway, the control of OE is nothing to do with php. It's a clientside problem, but that also depends on if the user has OE set up. If they haven't then your mail form is useless
DoNNo
04-08-2006, 03:59 AM
:p Actually i already can make a pop out OE by using javascript function and mailto. But i don't know how to pass my php value into my javascript.
$query = "Select Email from user where Emp_name='".$_POST["txtReceiver"]."';";
$result = mysql_query($query);
$row = mysql_fetch_assoc($result);
I want to pass $row["Email"] in to you@youremail.com
<Script type="text/javascript">
function trans(mode)
{
form.actionMode.value = mode;
if (validate())
form.submit();
if (form.actionMode.value=="Notify"){
parent.location='mailto:you@youremail.com?subject=Notification&cc=you2@youremail.com';
}
}
</script>
NancyJ
04-08-2006, 09:19 AM
<Script type="text/javascript">
function trans(mode)
{
form.actionMode.value = mode;
if (validate())
form.submit();
if (form.actionMode.value=="Notify"){
parent.location='mailto:<?=$row["Email"]?>?subject=Notification&cc=you2@youremail.com';
}
}
</script>
felgall
04-09-2006, 12:13 AM
Using mailto: will only pop out an email program if one is installed (many people are using public computers where they don't have that access).
Where an email is installed it may or may not be OE.
The only way that you can guarantee to be able to allow everyone to send an email is to use a server side script. In PHP this means using the mail function. You can configure the mail function to do everything that OE can do and a lot of things that OE can't do as well so why you would want to limit yourself I don't know.
DoNNo
04-10-2006, 02:29 AM
<Script type="text/javascript">
function trans(mode)
{
form.actionMode.value = mode;
if (validate())
form.submit();
if (form.actionMode.value=="Notify"){
parent.location='mailto:<?=$row["Email"]?>?subject=Notification&cc=you2@youremail.com';
}
}
</script>
NancyJ, I have already try the way u teach me, but still can't pass in:confused:
DoNNo
04-10-2006, 02:32 AM
Using mailto: will only pop out an email program if one is installed (many people are using public computers where they don't have that access).
Where an email is installed it may or may not be OE.
The only way that you can guarantee to be able to allow everyone to send an email is to use a server side script. In PHP this means using the mail function. You can configure the mail function to do everything that OE can do and a lot of things that OE can't do as well so why you would want to limit yourself I don't know.
Actually not I want to limit myself, but the instruction is like that so i just follow it...
But i am still very interesting in the one you said~configure the mail function to do everything that OE can do...
Do you have any links that related to this???so that i can learn more things:)
dniwebdesign
04-10-2006, 06:30 AM
http://ca.php.net/function.mail
NancyJ
04-10-2006, 07:43 AM
NancyJ, I have already try the way u teach me, but still can't pass in:confused:
Then the problem is elsewhere in your script.
DoNNo
04-10-2006, 08:29 AM
Then the problem is elsewhere in your script.
Now i did it until here get stuck again.
function trans(mode)
{
var sender = form.email.value;
form.actionMode.value = mode;
if (validate())
form.submit();
if (form.actionMode.value=="Notify"){
alert(sender);
alert(parent.location="mailto:<?=sender?>?subject=Notification&cc=you2@youremail.com&body=hello");
}
}
I alert the sender, it has value inside...
BUt just cant pass into mailto, there have no value.
NancyJ
04-10-2006, 08:32 AM
var sender = document.nameOfForm.nameOfEmailField.value;
and you dont need the <?= ?> around sender if you're using a javascript variable instead of a parsed php one.
DoNNo
04-10-2006, 08:41 AM
function trans(mode)
{
var sender = form.email.value;
form.actionMode.value = mode;
if (validate())
form.submit();
if (form.actionMode.value=="Notify"){
alert(sender);
alert(parent.location="mailto:sender?subject=Notification&cc=you2@youremail.com&body=hello");
}
}
If I put it this way, the value also can't appear.
In the OE field, it will appear "sender" this name.
NancyJ
04-10-2006, 09:17 AM
Reread my last post - you missed a bit ;)
goughy000
04-10-2006, 09:48 AM
that script wouldnt work on my setup, my default mailto is to a web based mail so it wouldnt open OE. I don't understand why you dont use PHPs mail function. It can do much much more! remember you can set mail headers...
DoNNo
04-12-2006, 02:56 AM
Thanks NancyJ....
I done it already by adding ++...
function trans(mode)
{
var sender = form.email.value;
form.actionMode.value = mode;
if (validate())
form.submit();
if (form.actionMode.value=="Notify"){
alert(sender);
alert(parent.location="mailto:"+sender+"?subject=Notification&cc=you2@youremail.com&body=hello");
}
}
Thanks for your help all the way:)
DoNNo
04-12-2006, 02:59 AM
that script wouldnt work on my setup, my default mailto is to a web based mail so it wouldnt open OE. I don't understand why you dont use PHPs mail function. It can do much much more! remember you can set mail headers...
Ya, i know what you mean.
BUt i can't use php mail function is because the user still do not know who they want to cc to, sometimes they might want to add more people to cc sometimes may not.
So i use OE so that they can add and delete on their own.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.