Semseng
New member
Hello,
At the moment, I am creating a simple mailer for my company's coworkers that is going to send different reminders, product quotations, and so on, anything that can be automatically generated within our company and sent without need for a person to do some unnecessary things like counting some data etc.
I have chosen SwiftMail as the library to use and managed to write a simple, basic code just to check if it's working and everything seems fine so far. The possible issue lies in the fact that there are two template code snippets: in first (to be seen here, first code snippet from the top), one has to specify host, username and password for the email account to be used. As I suppose, it logs onto the server and send emails from the server itself? In the second way (I am not sure where I had found it), there is no need to specify the SMTP details and nevertheless, I can easily set the "from" field within the script, so that the receiver sees the email as sent from the email specified.
My question is, is the second solution less secure, or can be potentially detected as spam on the receiving end? The thing is, I am writing such script for the first time and so I am not entirely sure, how does it work. Why do I ask? For some reason, the first solution does not work; server freezes when I am trying to send the email using this method and so I'd like to use the second way.
Great thanks for any suggestions,
Semseng
At the moment, I am creating a simple mailer for my company's coworkers that is going to send different reminders, product quotations, and so on, anything that can be automatically generated within our company and sent without need for a person to do some unnecessary things like counting some data etc.
I have chosen SwiftMail as the library to use and managed to write a simple, basic code just to check if it's working and everything seems fine so far. The possible issue lies in the fact that there are two template code snippets: in first (to be seen here, first code snippet from the top), one has to specify host, username and password for the email account to be used. As I suppose, it logs onto the server and send emails from the server itself? In the second way (I am not sure where I had found it), there is no need to specify the SMTP details and nevertheless, I can easily set the "from" field within the script, so that the receiver sees the email as sent from the email specified.
My question is, is the second solution less secure, or can be potentially detected as spam on the receiving end? The thing is, I am writing such script for the first time and so I am not entirely sure, how does it work. Why do I ask? For some reason, the first solution does not work; server freezes when I am trying to send the email using this method and so I'd like to use the second way.
Great thanks for any suggestions,
Semseng