I'm a bit confused about what form the FROMaddress is supposed to be in. I've tried a couple of alternatives and it appears as if you (I don't think it's the SMTP server) are rewriting them and they come out a bit odd.
I'll post examples if this is something that you've not seen before.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Just use the address the mail is going to be from
i.e. If you are person1@foobar.com
Then you send the "person1@foobar.com" string in the FROMaddress variable of the constructor.
whatever you pass in the constructor for this address should not be getting rewritten by the code. The only way to change it after construction of a mailer object is to use the
setsender(const std::string& newsender) function.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is not my address, I had the FROM and TO backwards in the constructor :), but something is still doing things a bit oddly.
I've tried with and without the double quotes around the name.
I'm talking directly with the company SMTP server, and it is possible that the transformation is happening there, but it doesn't seem to be for any other program.
I'll take a further look at the source.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
oops sorry my code does not allow for a real name (at present) in an address.
this is the simple line I use to address a mail
commandline = "MAIL FROM:<" + fromAddress + ">\r\n";
this will end up being:
MAIL FROM:<"Chuck" <charles.berghoefer@ihs.com>>
which of course is totally wrong.
Just remove the \"Chuck\"
I will add the ability to do this to the code!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No problem - I was just trying to make a nicely formatted from line - especially as this is from a "virtual" account - ie a running process. The name is the important part in this case . I'm using my email address so if they reply for some reason it will go to a real person.
I see what you were trying to do, but perhaps you should just depend on the programmer putting in a correctly formatted address.
The problem is, is that I sit here and look at it there are a couple of ways to be able to put in the info. Maybe it should just be parsed to see if it looks like a good address.
At any rate I appreciate your quick response and willingness to enhance the code.
Now if I could only solve that SunOS problem . . .
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm a bit confused about what form the FROMaddress is supposed to be in. I've tried a couple of alternatives and it appears as if you (I don't think it's the SMTP server) are rewriting them and they come out a bit odd.
I'll post examples if this is something that you've not seen before.
Just use the address the mail is going to be from
i.e. If you are person1@foobar.com
Then you send the "person1@foobar.com" string in the FROMaddress variable of the constructor.
whatever you pass in the constructor for this address should not be getting rewritten by the code. The only way to change it after construction of a mailer object is to use the
setsender(const std::string& newsender) function.
\"Chuck\" <charles.berghoefer@ihs.com>
That is the content of the string I put in for the FROMaddress, this is how it comes out in the email:
Chuck <charles.berghoefer@ihs.com> (Chuck <charles.berghoefer>)
(all one line, of course)
This is not my address, I had the FROM and TO backwards in the constructor :), but something is still doing things a bit oddly.
I've tried with and without the double quotes around the name.
I'm talking directly with the company SMTP server, and it is possible that the transformation is happening there, but it doesn't seem to be for any other program.
I'll take a further look at the source.
oops sorry my code does not allow for a real name (at present) in an address.
this is the simple line I use to address a mail
commandline = "MAIL FROM:<" + fromAddress + ">\r\n";
this will end up being:
MAIL FROM:<"Chuck" <charles.berghoefer@ihs.com>>
which of course is totally wrong.
Just remove the \"Chuck\"
I will add the ability to do this to the code!
Sorry Ken you also need to remove the < & > from each end of the address i.e.
"charles.berghoefer@ihs.com"
thats all you need
good luck
No problem - I was just trying to make a nicely formatted from line - especially as this is from a "virtual" account - ie a running process. The name is the important part in this case . I'm using my email address so if they reply for some reason it will go to a real person.
I see what you were trying to do, but perhaps you should just depend on the programmer putting in a correctly formatted address.
The problem is, is that I sit here and look at it there are a couple of ways to be able to put in the info. Maybe it should just be parsed to see if it looks like a good address.
At any rate I appreciate your quick response and willingness to enhance the code.
Now if I could only solve that SunOS problem . . .