Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
23fd0592
...
23fd0592e1bba8ad05f44d24e08b47d77314154f
authored
2007-07-16 18:16:10 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
New mtstailor variable "username"
1 parent
a581fd70
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
0 deletions
mh/send.c
mh/send.c
View file @
23fd059
...
...
@@ -341,6 +341,36 @@ read_mts_profile ()
exit
(
1
);
}
}
if
((
p
=
mh_context_get_value
(
mts_profile
,
"username"
,
NULL
)))
{
size_t
len
;
const
char
*
domain
;
char
*
newemail
;
int
rc
;
rc
=
mu_get_user_email_domain
(
&
domain
);
if
(
rc
)
{
mu_error
(
_
(
"Cannot get user email: %s"
),
mu_strerror
(
rc
));
exit
(
1
);
}
len
=
strlen
(
p
)
+
1
+
strlen
(
domain
)
+
1
;
newemail
=
xmalloc
(
len
);
strcpy
(
newemail
,
p
);
strcat
(
newemail
,
"@"
);
strcat
(
newemail
,
domain
);
rc
=
mu_set_user_email
(
newemail
);
if
(
rc
)
{
mu_error
(
_
(
"Cannot set user email (%s): %s"
),
newemail
,
mu_strerror
(
rc
));
exit
(
1
);
}
free
(
newemail
);
}
}
...
...
Please
register
or
sign in
to post a comment