How do i send message to email?

You will use the smtp that your ISP provides. Normally they publish this on their web-site; however you can also call them to determine what is their non-authenticated SMTP.

Regards,
Steve

Hi, THank you for the reply…i am just using wi-fi from my neighbor and i paid to them every month.

You’ll need to ask your neighbors what ISP they use, if you don’t know.

Thank you ralph for the reply…Okay but what if they don’t?:rolleyes:…is there any other ways to get the ISP :nono:

Check to see if they lack a pulse. That’s the only reason I can think why they wouldn’t know.

They can just check their bill to see whom they pay.

Then go to the website of their ISP and find out what their smtp is.

Okay…Thank you for the reply…I will try this.

Is this the SMTP

smtp.pldtdsl.net

if this is it, where i can put this?in php.ini

Is this what you mean

smtp.pldtdsl.net

If this is it,where should i put this in the swiftmailer? or php.ini ?

That’s probably it. :slight_smile:

If this is it,where should i put this in the swiftmailer? or php.ini ?

Possibly in both (this isn’t my area). Here is some info about swiftmailer (about half way down): http://swiftmailer.org/docs/sending.html

Okay i will try this now i’ll be back as soon as i can.

Yes this is an SMTP If this is the SMTP of the ISP of your neighbor then you can use this. Nowadays ISP’s don’t allow a person to use their Internet and a different SMTP (unless the person has their own mail server); instead they enforce that traffic over their network goes through their SMTP. This is why you need to use the SMTP supplied by the ISP you travel-over.

You would put this SMTP into the swiftmailer configuration.

Regards,
Steve

Hi ServerStorm,

You would put this SMTP into the swiftmailer configuration.

I tried to put in the swiftmailer but when i run my reg.php it will echo failed.I don’t know why.

here is my code please correct me if i am wrong.

reg.php


  <?php

 


require_once './lib/swift_required.php';







// Create the Transport
$transport = Swift_SmtpTransport::newInstance()
  ->setHost('smtp.pldtdsl.net')
  ->setPort('25')
  ;
  

  
 //MAIL 
 $transport = Swift_MailTransport::newInstance();


// Create the Mailer using your created Transport
$mailer = Swift_Mailer::newInstance($transport);





// Create the message
$message = Swift_Message::newInstance()



  // Give the message a subject
  ->setSubject('This is my subject')

  // Set the From address with an associative array
  ->setFrom(array('jemz@yahoo.com' => 'Jemz'))

  // Set the To addresses with an associative array
  ->setTo(array('myemail@yahoo.com' => 'jemjem'))

  // Give it a body
  ->setBody('Here is the message itself')


  ;
 





// Send the message
if ($mailer->send($message))
{
  echo "Sent\
";
}
else
{
  echo "Failed\
";
}

 
?>



Hi jemz,

You have put the SMTP in the correct place.

Do you know if this is an authenticated or non-authenticated SMTP? If it is authenticated then you will need to ensure that you provide the authentication details. You could ask your neighbour for the credentials if the are willing to share them with you.

before trying to get this working in SwiftMailer, maybe first try sending an email using the command line. Here is a link to a tutorial that shows you how to do this. If you use this technique and it successfully sends an email, then it is a problem with your credentials/settings; however if you are unsuccessful then you need to get to a point where you can do it via the command line before setting up your SwiftMailer config.

If you are wondering why do it using the command line. The reason is that it will show you all connection, data and sending steps that you don’t see behind a mail client.

Hi serverstorm,Thank you for the reply, okay i will try this and i will let you know if i succeed.

Hi ServerStorm, I tried it but i got problem in the

rcpt to:<address>
it will says access denied.

myRealEmail@yahoo.com-just assume that is my real email address
here is the result in the command prompt


220 mta3.zimbra.epldt.net ESMTP Postfix
ehlo example.com
250-mta3.zimbra.epldt.net
250-PIPELINING
250-SIZE 157286400
250-VRFY
250-ETRN
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from: test@example.com
250 2.1.0 Ok
rcpt to: myRealEmail@yahoo.com
554 5.7.1 <myRealEmail@yahoo.com>: Relay access denied


Hi jemz,

Do you have an Public MX record setup for your example.com (whatever the real domain is)? If not, then make sure you have a valid MX record. Often times this 'access denied is due to the lack of a proper mx record.

Also ensure you have created a reverse PTR record for the DNS entry for your example.com email server as well. Once you have this done then test and we’ll go from there.

Hi ServerStorm, Thank you for the reply…I am confuse.i thought i could just send simple mail php code in my localhost,…with out any configuration about what you have said.

Public MX record setup

and

Also ensure you have created a reverse PTR record for the DNS entry for your example.com email server as well. Once you have this done then test and we’ll go from there.

My point is just to try send mail using swiftmailer and simple php code…I have no domain like www.mypage.com

If you are trying to route out messages from example.com to a public mail address like someone@yahoo.com, then you need to have a MX record in place for your server where the email is sent from. No matter if you are trying to do something simple, you are still creating a mail server using SwiftMailer. This means that the DNS configurations that normally have to be done for a mail server must be done for your SwiftMailer as well.

Mail servers that will receive mail from your SwiftMailer will likely be set to validate your mail server. If no public DNS records exist (MX, Reverse PTR) then many receiving mail servers will reject such messages.

I hope this clears it up why you have to get this sorted out.

[ot]

Maybe you should consider it. :slight_smile: You can get cheap hosting these days, and it would make this a lot easier. [/ot]

Hi ralph, why you said i am off topic i am just explaining serverstorm that i have no live website. like www.mywebsite.com…:injured:…by the way sorry for my english but i am trying to ask some help like you and serverstorm or other who reads my thread…I apologize for my English if you misinterpret.:confused: