Jump to content

Recommended Posts

Dear People,

 

Is It OK if any one would help me to do "Send an Email",

 

I understand sending an email:

"

<?php

$to = "someone@example.com";

$subject = "Test mail";

$message = "Hello! This is a simple email message.";

$from = "someonelse@example.com";

$headers = "From: $from";

mail($to,$subject,$message,$headers);

echo "Mail Sent.";

?>

 

"

 

codewise it should not be a problem,

I have sent emails in VB6.0, thus I know need to supply (1) smtp address, (2) port=25, my (3)email address to complete the transection.

 

Can you please guide me how to supply, thanks.

I have

Link to comment
https://forums.phpfreaks.com/topic/48578-sending-email/
Share on other sites

work computer,

 

I have the port it is not 25, it is XXXX(i can't tell the number boss will kill me)

I have the smtp address also,

 

I amended php.ini

 

[mail function]

; For Win32 only.

SMTP = mail.xxxx.com

smtp_port = XXXX

 

but the error on the screen is

 

"

Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\wamp\www\MyPHP\Member\Untitled-2.php on line 14

"

 

My values are not used

Link to comment
https://forums.phpfreaks.com/topic/48578-sending-email/#findComment-237872
Share on other sites

i'm sure it's listed somewhere in php.ini but otherwise, you can locally change the values using ini_set() like this

 

ini_set('smtp_port', 25);

ini_set(SMTP, 'HOST_NAME');

 

look up ini_set for more info

 

oh ok, i get what you're saying about php.ini

Link to comment
https://forums.phpfreaks.com/topic/48578-sending-email/#findComment-237879
Share on other sites

i am at home, i work from home here in Bay City, MI. Madonna was raised here. that's our only claim to fame....

 

 

these are local settings, i.e. it only works while the script is processing. so depending on how you set it up, you could have to do this for every email, or .. if your making an email script just put those at the top and it will be AOK...

Link to comment
https://forums.phpfreaks.com/topic/48578-sending-email/#findComment-237901
Share on other sites

  • 3 weeks later...

People I have solved, just an additional "stop" killed me for days.

 

I have another situation,

When I put it into an automated email system, I noted that the instructions after the email procedure waits for the email to be over then continues, this way all the instructions after the emails waits and hogggggggssss.

 

Can we make it "trigger an email" and go.

Link to comment
https://forums.phpfreaks.com/topic/48578-sending-email/#findComment-255147
Share on other sites

I'm having email issues also.

 

my php based forum software will not send emails.

 

And I wrote a basic php sendmail() to test it, and it says it sends it, no errors, but I never receive anything in my inbox.

 

What could be the problem? especially with standard php mailsend??

 

thanx

Link to comment
https://forums.phpfreaks.com/topic/48578-sending-email/#findComment-255164
Share on other sites

You can do it by changing the ini file

test by using ini_get();

Else

Use the mail class from here http://zigmoyd.sourceforge.net/man/mail.php#mail

This Page http://zigmoyd.sourceforge.net/man/index.php Describes how to Install it and instruction

Open teh setup_mail.php file and Change the following

		.............................
	var $host = "HOST";
	var $port = 25;//Port number
                     .................................

And you are ready

dont downloload the current version 1.0.1.0 it has a Bug Download the 1.0.0.1

Link to comment
https://forums.phpfreaks.com/topic/48578-sending-email/#findComment-255166
Share on other sites

Dear Friends,

 

I am glade that two of you have suggested us API like features.

 

May I ask two questions.

(1) I want "email and go" type, I do not not want my after email instructions to wait for the outcome of the email, the reason, in automated email this will hog all users on queue.

(2) Have you tested my idea before, please comment.

Link to comment
https://forums.phpfreaks.com/topic/48578-sending-email/#findComment-255171
Share on other sites

Yeah I have. I have 2 php forums, one phpbb and one SMF, and I also wrote a simple sendmail code, none of these 3 worked.

 

I don't understand it. Especially the forums, they use basic php mail sending, I don't understand why it shouldn't work.

 

Must be something to do with my server perhaps.

Link to comment
https://forums.phpfreaks.com/topic/48578-sending-email/#findComment-255172
Share on other sites

I didn't understand This line "I do not not want my after email instructions to wait for the outcome of the email, the reason, in automated email this will hog all users on queue."

I am poor in English

But 2 Side notes

1. I've told it can be done using ini_set() thats why I've told you test using ini_get().

2. Zigmoyd will send the mails IMMEDIETLY even it can show how its sending and how its talking with the SMTP server. So no Queue.

Link to comment
https://forums.phpfreaks.com/topic/48578-sending-email/#findComment-255178
Share on other sites

Dear Neel,

 

Example

 

Bla Bla Bla 1

Send Email

Bla Bla Bla 2

 

With my traditional code:

 

(i) Bla Bla Bla 1 gets excuted,

(ii) Bla Bla Bla 2 gets excuted only after the email sequence has been done (it does not matter pass or fail).

 

What I want is:

(i) Bla Bla Bla 1 gets excuted,

(ii) trigger email

(iii) Bla Bla Bla 2 gets excuted without waiting for email sequence has been done.

 

I am sorry I clustered all into one phrase earlier.

Link to comment
https://forums.phpfreaks.com/topic/48578-sending-email/#findComment-255189
Share on other sites

One Socket (Programm) cant send 2 mails through 1 SMTP server at the same time .

There must be a queue that after (Successful OR Unseccfull) sending of a mail it starts sending the second mail.

else If you create two mail objects it wil probabbly create two different  Sockects to send mail as then there are more than one soclkets you can send 2 mails at ~ same time

And Weather it will check for the previous mail has been sent or not it depends uppon you . And if you have to send more mails you need to use group_mail class .

And whatever script you use in PHP SMTP server always queues the mails by itself.

Link to comment
https://forums.phpfreaks.com/topic/48578-sending-email/#findComment-255197
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.