Jump to content

actual emailing


manix

Recommended Posts

so you need their outgoing mail server, and port number

a quick search I found that this is their out going mail server : smtp.abv.bg

and their port is : 465

so go to your php.ini (in your xamp folder)

and search for:

SMTP=localhost (change the localhost to smtp.abv.bg)

and the port number, change it to 465

lastly they use secure socket layer ssl

search for 'extension=php_openssl.dll' and uncomment it by delet the ; infront of it....

follow so far?

if that's not working you have to confirm with their outgoing mail server that's it's definitly smtp.abv.bg

Link to comment
Share on other sites

Hey, I want to ask how can I actually send emails using php ?  All tutorials show on how to send emails via outlook and I don't want that, I want to send emails from say example@yahoo.com, how do I do that ?

oh, you can't send email using somebody else's address!!! lol

I was assuming you're using your own email address... and yes you need the password, if its your email address use your password to that address.

and can you post the source code that you're working with?

 

Link to comment
Share on other sites

don't be embarassed... if you don't ask you don't know :)

this code is wrong

<? mail('target@abv.bg', 'subject', 'message'); ?>

that's not all the code that neccessary to send email... It need heading in there...

here follow this example...

http://www.w3schools.com/PHP/php_mail.asp

and don't forget to do the setting from here

so go to your php.ini (in your xamp folder)

and search for:

SMTP=localhost (change the localhost to smtp.abv.bg)

smtp_port = (after the = replace with 465)

sendmail_from = you@yourdomain.com (your email addres the blabla@abv.bg)

lastly they use secure socket layer ssl

search for 'extension=php_openssl.dll' and uncomment it by delet the ; infront of it....

let me know

Link to comment
Share on other sites

I don't get it again... this is my line

 

<? mail('man.in.black@abv.bg', 'subject', 'message', 'From:rali__90@abv.bg'); ?>

 

and I get this

 

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()

 

here's the php.ini

 

[mail function]

; For Win32 only.

; http://php.net/smtp

SMTP = smtp.abv.bg

; http://php.net/smtp-port

smtp_port = 465

 

; For Win32 only.

; http://php.net/sendmail-from

;sendmail_from = rali__90@abv.bg

Link to comment
Share on other sites

the error show that the changes is not saved... You still have localhost as your smtp and the port is the still 25... it should be SMTP = smtp.abv.bg and smtp_port = 465. Make sure that those two are changes... go back in there see if the two lines are changed. if not change it and saves and restart the xamp server...

after that try this one for me... just copy and paste it into your page. and run it (assuming that "man.in.black@abv.bg" is a real email address)

$to = "man.in.black@abv.bg";
$subject = "mail testing";
$message = "Did you get this message?";
$headers = "MIME-Version: 1.0" . "\r\n";
$headers.= "Content-type:text/html;charset=iso-8859-1" . "\r\n";	
$headers .= 'From: <rali__90@abv.bg'>' . "\r\n";
mail($to,$subject,$message,$headers);

 

most important make sure the smtp and the port is changed and saved

Link to comment
Share on other sites

Erm okay I restarted the server and now my code loads forever and nothing happens,

 

your code gives this

Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in C:\xampp\htdocs\test2.php on line 13

 

the line that I am supposed to remove the ; from does not exist :/

 

EDIT: and yes both emails are mine and exist

 

EDIT2: I fixed some typos in your code and it loads forever too now

Link to comment
Share on other sites

I tried Xamp and hated it lol... been using Wamp

you sure couldn't find ;extension=php_openssl.dll ?

try to search ssl in php.ini

but we're getting somewhere:

the error just checking to see that we have the from: in the header...

so after restart the server, test it see wat's the error is. I have one more solution...

and if you could post all the code in the test2.php here it would be great help for me !!! :) cuz then i know what's in line 13 that gave the error

 

 

 

Link to comment
Share on other sites

It doesn't find ssl either, I tried finding it, believe me. Here are all php extensions whatever that is (I guess it's supposed to be there)

 

 

extension=php_bz2.dll

;extension=php_curl.dll

;extension=php_dba.dll

extension=php_mbstring.dll

extension=php_exif.dll

;extension=php_fileinfo.dll

extension=php_gd2.dll

extension=php_gettext.dll

;extension=php_gmp.dll

extension=php_imap.dll

;extension=php_interbase.dll

;extension=php_ldap.dll

;extension=php_mssql.dll

;extension=php_mysql_mysqlnd.dll

extension=php_mysql.dll

;extension=php_mysqli_mysqlnd.dll

extension=php_mysqli.dll

;extension=php_oci8.dll

;extension=php_pdo_firebird.dll

;extension=php_pdo_mssql.dll

;extension=php_pdo_mysql_mysqlnd.dll

extension=php_pdo_mysql.dll

extension=php_pdo_odbc.dll

;extension=php_pdo_pgsql.dll

extension=php_pdo_sqlite.dll

;extension=php_pdo_sqlite_external.dll

;extension=php_pgsql.dll

;extension=php_pspell.dll

;extension=php_shmop.dll

;extension=php_snmp.dll

extension=php_soap.dll

extension=php_sockets.dll

extension=php_sqlite.dll

extension=php_sqlite3.dll

;extension=php_sybase_ct.dll

;extension=php_tidy.dll

extension=php_xmlrpc.dll

 

[PECL]

extension=php_ming.dll

;extension=php_pdo_oci.dll

;extension=php_pdo_oci8.dll

 

 

and it's not giving me any error it's just loading like when you have an inifinite loop

 

here's the file

 

<html>
<head>
</head>
<body>
<? // mail('man.in.black@abv.bg', 'super si gotin', 'naistina e taka', 'From:rali__90@abv.bg'); 
$to = "man.in.black@abv.bg";
$subject = "mail testing";
$message = "Did you get this message?";
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n";	
$headers .= 'From: <rali__90@abv.bg>' . "\r\n";
mail($to,$subject,$message,$headers);
?>
</body>
</html>

Link to comment
Share on other sites

oh forget about extension=php_openssl.dll, it's built into the xamp not like wamp...

so when you test the page, it came up blank right? that's not a loop, there's no loop in the code...

if there's no error, check your email it should be there with the "Did you get this message?" message in the body of the email...

if you want to see if the email sent just echo "email sent" after the mail();

let me know

Link to comment
Share on other sites

in that case it's not loading lol it probly is freezing  :o ... so your xamp server is back up right? Probly need to x out that browser and retest it.

if you're using windows, you're prbly need to restart the whole computer... restart usually fix 90% the problems in windows  ;D

Link to comment
Share on other sites

restart usually fix 90% the problems in windows 
amen lol

 

Forget xampp (by your words I guess ms invented xampp lol)

 

My hosting provider is supposed to have those settings configured I guess, all I wanna know is are you sure this is the correct syntax to send an email, because what's bothering me is how can I send an email from rali__90@abv.bg without entering the password anywhere?

Link to comment
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.